Skip to content

Instantly share code, notes, and snippets.

@VladimirReshetnikov
Created January 12, 2014 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladimirReshetnikov/8379379 to your computer and use it in GitHub Desktop.
Save VladimirReshetnikov/8379379 to your computer and use it in GitHub Desktop.
using System;
using System.Reflection;
class Program
{
static void Main()
{
var allocate = typeof (RuntimeTypeHandle).GetMethod("Allocate", (BindingFlags) 40);
var open = allocate.Invoke(null, new[] {typeof (C<>.E)});
Console.WriteLine(open.GetType());
}
}
class C<T>
{
public enum E { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment