c# - How i can put generic class into the collection? -


I have a generic -smclass which calculates the full value for numbers and I want to keep it in the archive and then The purpose of the class to me from this collection. I had already declared some class and I want to write something like this:

  class example & lt; T & gt; {Collection & lt; T & gt; Collection = new collection & lt; T & gt; (); Public Zero AddSomeClassIntoCollection () {collection.Add (some class ); }}  

  class example & lt; T & gt; {Collection & lt; T & gt; Collection = new collection & lt; T & gt; (); Public Zero AddSomeClassIntoCollection (T Items) {collection.Add (item); }}  

What are you doing after this?


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -