A particular class has a Hashtable containing 1..N elements. I'm wondering if there are generic getter/setter methods for the Hashtable used in a class. I'm looking to make the hashtable values behave more like regular object properties:
public class foo
{
private HashTable _stuff;
public HashTable stuff { get; set; }
public foo() {}
}
I was wondering if something like this can happen:
foo bar = new foo();
bar.stuff.name; //returns the data in the 'name' index if it exists
bar.stuff.name = "Me"; //sets the stuff[name] value = "me"