Can the following be done in C#?:
var greeting = "Hello" + function ()
{
return " World";
}() + "!";
I want to do something along the lines of this (C# pseudo code):
var cell = new TableCell { CssClass = "", Text = return delegate ()
{
return "logic goes here";
}};
Basically I want to implement in-line scoping of some logic, instead of moving that chunk logic into a separate method.