Let's say I have this:
dynamic foo = new Foobar();
And I have this:
public class Foobar : DynamicObject
{
}
The question is, is it possible to override members of DynamicObject
so that this code:
string name = new Foobar().Name
Does not throw an Exception
at run-time? I want to return default
for name
's if Name
is not a member.
Possible? What do I need to override?