Type inference of generic method #8349
-
void Foo<T>(Action<T> f);
void Bar(string str);
//1
Foo<string>(Bar);
//2
var bar = Bar;
Foo(bar);
//3
Foo(Bar); //error: CS0411 Why does the third writing method report an error? |
Beta Was this translation helpful? Give feedback.
Answered by
colejohnson66
Aug 9, 2024
Replies: 1 comment
-
#129? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MyPledge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#129?