Reporter |
|
---|---|
Created | Dec 1, 2009 9:24:39 PM |
Updated | Apr 6, 2018 6:14:05 PM |
Resolved | Apr 6, 2018 6:14:05 PM |
Subsystem | Quick Fixes |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Critical |
State | Obsolete |
Type | Bug |
Fix version | Backlog |
Affected versions | No Affected versions |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Exmple 1.
(code is not compilable - out parameter is not assigned but that's exactly the reason why I want to convert to the anonymous method)
convert to anonymouse method:
Code is not compilable because delegate signature is not inserted.
Example 2.
result:
delegate object Handler(out int a);
void Foo(Handler h){}
void Bar()
{
Foo((out int i) => "");
}
(code is not compilable - out parameter is not assigned but that's exactly the reason why I want to convert to the anonymous method)
convert to anonymouse method:
delegate object Handler(out int a);
void Foo(Handler h){}
void Bar()
{
Foo(delegate { return ""; });
}
Code is not compilable because delegate signature is not inserted.
Example 2.
delegate object Handler(out int a);
void Foo(Handler h){}
void Bar()
{
Foo((out int i) =>
{
i = 0;
return "";
});
}
result:
delegate object Handler(out int a);
void Foo(Handler h){}
void Bar()
{
Foo(delegate(int i)
{
i = 0;
return "";
});
}
- still not compilable.