Workflow code-behind in WF4.0 is not a place where you can write arbitrary C# code. Workflows are XAML-based compositions of activities, and the 'code-behind' is limited to event handlers and specific extension points, not general-purpose C# logic. Custom logic should be encapsulated in custom activities or expressions.