A
Adam Badura
Is there a way to specialize generic types or methods tha same way as it
is possible in C++ for example?
I know that instead of specializing a class
class MyCollection<TType>
for string type I could do something like
class MyStringCollection : MyCollection<string>
or even something like
class MyCollection<Type> : IMyCollection<Type>
class MyStringCollection : IMyCollection<string>
However selection of type MyStringCollection is not automatic. If
programer uses MyCollection<string> (perhaph unaware of the existance of
specialized class) then nothing will even let him know that he should use
MyStringCollection.
So to sum up is there a way in C# to do it like you can do it in C++?
Adam Badura
is possible in C++ for example?
I know that instead of specializing a class
class MyCollection<TType>
for string type I could do something like
class MyStringCollection : MyCollection<string>
or even something like
class MyCollection<Type> : IMyCollection<Type>
class MyStringCollection : IMyCollection<string>
However selection of type MyStringCollection is not automatic. If
programer uses MyCollection<string> (perhaph unaware of the existance of
specialized class) then nothing will even let him know that he should use
MyStringCollection.
So to sum up is there a way in C# to do it like you can do it in C++?
Adam Badura
