Skip to content

Instantly share code, notes, and snippets.

@copenhas
Created July 13, 2011 03:22
Show Gist options
  • Save copenhas/1079648 to your computer and use it in GitHub Desktop.
Save copenhas/1079648 to your computer and use it in GitHub Desktop.
//TData is a type parameter name, sort of like a type variable
public class Node<TData> {
public Node(TData data){
Value = data;
ConnectedNodes = new List<Node>();
}
//notice that TData is the type parameter name from above
public TData Value { get; private set; }
public IList<Node<TData>> ConnectedNodes { get; private set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment