Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expose Hashtable Keys

Status
Not open for further replies.

kettch

Programmer
Mar 5, 2001
110
US
Does anybody know if there is another way to expose Hashtable keys? I think what I want to do is have a hashtable (or something similar) that can expose it's keys as properties. So that hTable("KeyValue") would become hTable.KeyValue

I don't know if it's possible, but it would save me whole lot of time with this particular project.

I am using CodeDom to compile a class dynamically, for one type of the class that stays pretty much the same all of the time I just have it implement an interface so that I can know what properties to call. (Much easier and more efficient than reflection). For this other type, the properties will change fairly often based on data in the database. If i can I'd like to have it implement just an interface that can return some sort of collection like I described above.

If it can't be done, does anybody know the best way to reflect all of the properties from an assembly? I've played with reflection a little before, but it seems kind of complicated, and I'm not sure what is going to work best.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top