Created
July 13, 2011 03:22
-
-
Save copenhas/1079648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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