Skip to content

Instantly share code, notes, and snippets.

@Benrnz
Created February 26, 2009 20:16
Show Gist options
  • Save Benrnz/71080 to your computer and use it in GitHub Desktop.
Save Benrnz/71080 to your computer and use it in GitHub Desktop.
///<summary>Generic method sample signature with restrictions</summary>
private static T GetTestDataInstance<T>() where T : class, new() {
var root = GetTestDataInstance(typeof(T));
return root as T;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment