I have a question regarding the most efficient way to design a class that handles a large number (10K+) of dynamic properti开发者_开发知识库es. Properties only hold boolean or double value types.
I've thought of a couples of answers but not sure if I am on track.
- Class has one property that passes a hashtable
- Create class at runtime with properties that represent parent nodes, that can be used to retrieve child classes with child node properties.
I trust that you're not actually talking about properties but a collection of name-value pairs. That's covered by the Dictionary<> class. The ExpandoObject class, available in .NET 4.0 is perhaps worth mentioning.
精彩评论