How do create a Dynamic class in C# 4?

后端 未结 1 2019
-上瘾入骨i
-上瘾入骨i 2020-12-11 08:11

I want to create an object in C# and have it do interesting things based on the name of the non-existent method that gets.

In ruby, this is method_missing. In Perl,

相关标签:
1条回答
  • 2020-12-11 08:57

    Try using System.Dynamic.DynamicObject as a simple starting point and base class. You can find an example at http://winterdom.com/2009/05/dynamicobject-in-c-40.

    0 讨论(0)
提交回复
热议问题