Creating Your Own Custom Dynamic C# Classes

added by DotNetKicks
6/16/2016 8:17:43 AM

2 Kicks, 885 Views

C# provides pre-supplied dynamic types such as the ExpandoObject. It is also possible to create new dynamic types or add dynamic capabilities to existing custom classes. One of the core interfaces that enables dynamic behaviour is the IDynamicMetaObjectProvider interface. Whilst this interface can be implemented, an easier way to create a custom dynamic class is to inherit from DynamicObject class.