Created
January 9, 2014 22:21
-
-
Save VladimirReshetnikov/8343177 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
using System; | |
static class Program | |
{ | |
static void Main() | |
{ | |
Action action = ((object)0).Foo; | |
if (action.Target != null && action.Method.IsStatic) | |
{ | |
Console.WriteLine(action.Target.GetType().IsValueType); | |
Console.WriteLine("Delegate from static method with target instance!?"); | |
} | |
} | |
static void Foo<T>(this T x) { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment