Search code examples
c#workflow-foundationinvoke

Invoke method in C# WWF


I am getting error when using invoke method in c# WWF

Here is my code:

namespace WorkflowConsoleApplication2
{
    public class TClass1
    {
        public  static String  update1(String name)
        {
            return  
            "Hello"+ name ;
        }
    }
}

and here is my invoke method with error: enter image description here

How to fix this problem?

Thank you.


Solution

  • You must pass the 'name' paramter to the Parameters property. http://msdn.microsoft.com/en-us/library/system.activities.statements.invokemethod.parameters(v=vs.110).aspx There is a code example but you are doing your stuff through the WF designer (which is easier than code). Look at the properties for the activity for the Parameters property.