我爱Aspx >> Asp.Net >> 关于反射的效率问题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
Ҷƪл˵?
初学三层结构问题[07-06]
窗口刷新闪烁问题[07-06]
类似这样的XML该如何读取?如何形..[07-06]
请问:如何用C#生成一个完整的xm..[07-06]
在 System.InvalidOperationExce..[07-06]
关于 Sql 多条件查询传参数的问题[07-06]
格式化字符串的问题。[07-06]
private CurrencyManager cmAmen..[07-06]
System.Web.HttpContext.Current..[07-06]
Socket,HttpWebRequest,WebClien..[07-06]