c# - How to encapsulate the concept of a combination of generics into a new type? -


Is there any way anyone can interpret the dictionary as a new type of data dictionary, so that changes in definition Need be Although many places are used, it can only be changed in some. Or should I wrap it in another class and only highlight aspects of it?

dictionary if you want a proper sub-type, turn it off

  Class DataDictionary & lt; K, V> : Dictionary & lt; K, V> {}  

And another option is:

  Class DataDictionary & lt; K, V> {Private Dictionary & lt; K, V> _Information; }  

Which gives you more freedom to design your own type.
And if you mean "how to eliminate type-criteria", use something like this:

  class datadition: dictionary & lt; String, int & gt; {}  

Comments

Popular posts from this blog

MySql variables and php -

c# - How can I find out if there are windows above a control? -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -