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
Post a Comment