Created
April 28, 2014 21:57
-
-
Save rranelli/11385251 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ClassWithMethodMissing : DynamicObject { | |
| public override bool TrySetMember(SetMemberBinder binder, object value) { | |
| _dictionary[binder.Name] = value; | |
| return true; | |
| } | |
| public override bool TryGetMember(GetMemberBinder binder, | |
| out object result) { | |
| return _dictionary.TryGetValue(binder.Name, out result); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment