I am sure that you have not defined your SingleLinkNode class as having a generic parameter type. Thus, an attempt to declare it using one fails.
The error message suggests that SingleLinkNode is a nested class, so I suspect that it might happen that you declare members of SingleLinkNode type T without actually declaring T as a generic parameter for SingleLinkNode . You still need to do this if you want SingleLinkNode be shared, but if not, then you can just use the class as SingleLinkNode , not SingleLinkNode<T> .
An example of what I mean:
public class Generic<T> where T : class { private class Node { public T data;
If you want your nested class to be shared, this will work:
public class Generic<T> where T : class { private class Node<U> { public U data;
source share