0
下面我在Microsoft-Windows-Workflow-4-0-cookbook中練習了一些練習中的一些代碼片段。我不明白lambda表達式。 aec在以下上下文中是什麼(aec => testClass)。工具提示表明這是一個活動上下文。它的目的是什麼?Windows Workflow Foundation InvokeMethod類
TestClass testClass = new TestClass();
Variable<string> resultValue = new Variable<string>();
return new Sequence()
{
Variables = { resultValue },
Activities = {
new WriteLine() {Text = "... Invoke void Method()"},
new InvokeMethod() { TargetObject = new InArgument<TestClass> (aec=>testClass),
MethodName = "Method", },
http://stackoverflow.com/questions/290061/what-does-the-syntax-in-c-sharp-mean – DotNetHitMan