次のコードがあります。
class myClass
{
private delegate string myDelegate(Object bj);
protected void method()
{
myDelegate build = delegate(Object bj)
{
var letters= string.Empty;
if (someCondition)
return build(some_obj); //This line seems to choke the compiler
else string.Empty;
};
......
}
}
自分自身を呼び出すことができるように、C# で匿名メソッドを設定する別の方法はありますか?