Reflection.Emit better than GetValue & SetValue :S

后端 未结 5 1527
说谎
说谎 2020-12-13 21:03

I\'ve been told to use Reflection.Emit instead of PropertyInfo.GetValue / SetValue because it is faster this way. But I don\'t really know what stuff from Reflection.Emit a

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 21:20

    Using Reflection.Emit seems a little too "clever", as well as a premature optimization. If you profile your application, and you find that the GetValue/SetValue Reflection is the bottleneck, then you could consider optimizing, but probably not even then...

提交回复
热议问题