Search code examples
c#workflow-foundation-4

WorkflowDesigner - How do I specify expressions should be in C#?


I'm looking into the Workflow Designer for Windows Workflow Foundation and I've got a little application running hosting the designer, toolbox and property inspector as per the instructions on MSDN: http://msdn.microsoft.com/en-us/library/dd489407.aspx

When adding a statement such as Assign for example, the expression boxes state that VB should be used for the expressions; however, using the workflow designer within a C# workflow project in Visual Studio they allow C# expressions.

How do I specify to the designer / statements / toolbox entries that C# should be used?

Thanks.


Solution

  • When using WF 4.5 with VS11 if you create a C# project, your expressions will be in C#, if you create a VB project they will be in VB.

    You can add existing workflows with VB expressions to a C# project if you like.