• λ我爱Aspx >> Asp.Net >> 关于反射的效率问题
  • 关于反射的效率问题

  • :aspxer  Դ:csdn  :2007-7-6 2:51:35  ؼ:
  • each type and member. This means that reflection is constantly performing string

    Chapter 22: Assembly Loading and Reflection 555

    searches as the types in the System.Reflection namespace scan through an assembly"s

    metadata. Often, the string searches are case-insensitive comparisons, which can slow

    this down even more.

    Invoking a member by using reflection will also hurt performance. When using reflection to

    invoke a method, you must first package the arguments into an array; internally, reflection

    must unpack these on to the thread"s stack. Also, the CLR must check that the arguments are

    of the correct data type before invoking a method. Finally, the CLR ensures that the caller has

    the proper security permission to access the member being invoked.

    For all of these reasons, it"s best to avoid using reflection to access a member. If you"re writing

    Ҷƪл˵?
  • һƪ字符串怎么转换成日期?
    һƪ初学三层结构问题