I'd like to type a SortedList as very generic on class instantiation:
SortedList<T, T> _sl;
Then in two particular methods of the class that is called first(of
which only one or the other is used per instance), I will do
_sl = new SortedList<string,int>();
or
_sl = new SortedList<string,string>();
but I always get this error:
The type or namespace name 'T' could not be found (are you missing a
using directive or an assembly reference?)
Collections.Generic is included. Why is the above error being thrown?
Must I declare both types of list to get around this?
Thanks,
Brett