Generate dynamic method to set a field of a struct instead of using reflection

前端 未结 6 1175
温柔的废话
温柔的废话 2020-12-08 12:19

Let\'s say I have the following code which update a field of a struct using reflection. Since the struct instance is copied into the DynamicUpdate

6条回答
  •  青春惊慌失措
    2020-12-08 12:51

    You could fairly easily modify this to work with structs. It's currently dictionary based but your situation is easier.

    http://www.damonpayne.com/2009/09/07/TwoWayBindingToNameValuePairs.aspx

提交回复
热议问题