Dynamically adding members to a dynamic object

前端 未结 4 1391
野性不改
野性不改 2020-12-05 21:07

I\'m looking for a way to add members dynamically to an dynamic object. OK, I guess a little clarification is needed...

When you do that :

dynamic fo         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-05 21:44

    I know this is quite an old post, but I thought I'd pass along Miron Abramson solution on how you can create your own type and add properties at runtime -- in case anyone else out there is looking for something similar.

提交回复
热议问题