public struct A
{
static void Main()
{
F f = new A().Foo; // error CS1113: Extension methods 'B.Foo(A, int)' defined on Value type 'A' cannot be used to create delegates
}
}
publicstatic class B
{
publicstatic void Foo(this A x, int y) { }
}
delegate void F(int y);
Description
public struct A
{
static void Main()
{
F f = new A().Foo; // error CS1113: Extension methods 'B.Foo(A, int)' defined on Value type 'A' cannot be used to create delegates
}
}
publicstatic class B
{
publicstatic void Foo(this A x, int y) { }
}
delegate void F(int y);