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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -