delegate T Foo (); public class Test { public static int Main () { string message = "Hello World!"; Foo foo = () => message; if (Bar (foo) != message.GetHashCode ()) return 1; return 0; } static int Bar (Foo foo) { return foo().GetHashCode (); } }