Skip to content

Instantly share code, notes, and snippets.

@marek-safar
Created April 5, 2012 16:31
Show Gist options
  • Save marek-safar/2312372 to your computer and use it in GitHub Desktop.
Save marek-safar/2312372 to your computer and use it in GitHub Desktop.
using System;
class C
{
public static void Main ()
{
G<int>.Foo ();
}
}
class G<T> where T: new ()
{
public static void Foo ()
{
Console.WriteLine((new T()).GetType().ToString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment