Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class Config
- {
- public class Items : DynamicObject
- {
- private NameValueCollection _items;
- public Items()
- {
- _items = ConfigurationManager.AppSettings;
- }
- public override bool TryGetMember(GetMemberBinder binder, out object result)
- {
- result = _items[binder.Name];
- return result != null;
- }
- }
- public static Items Instance { get { return new Items(); } }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement