How to create own dynamic type or dynamic object in C#?

前端 未结 7 1373
醉话见心
醉话见心 2020-12-04 08:05

There, is for example, ViewBag property of ControllerBase class and we can dynamically get/set values and add any number of additional fields or properties to t

相关标签:
7条回答
  • 2020-12-04 09:09
    dynamic myDynamic = new { PropertyOne = true, PropertyTwo = false};
    
    0 讨论(0)
提交回复
热议问题