Skip to main content

Partial method cannot have out parameters

In This Article

CodeRush Classic shows the Partial method cannot have out parameters code issue if a partial method has out parameters.

#Fix

Remove the out parameters from the partial method declaration.

#Purpose

Highlights the partial method declarations, which would cause the A partial method cannot have out parameters compilation error.

#Example

partial void ProcessString(string str, out int length);

Fix:

partial void ProcessString(string str);