Please enable JavaScript.
Coggle requires JavaScript to display documents.
Generic Types - Coggle Diagram
Generic Types
DataStructure
List
-
-
Generic List
we can declare same array class with T. to set the default value we can use a c# syntax default. default(T)
Tuple
-
-
var tuple = new Tuple<string, string, int>(val1,val2,val3)
Access via tuple.item1,tuple.item2
return public Tuple<string, string, int> getTuple()
-
-
-
we can make both class and method generic.Only class generic possible or only method generic possible