C#-CSharpNoRefAndOutParameters

Parameters with modifiers ref and out should not be used

Required inputs: CSharpAST

This rule reports parameters passed by reference (i.e., decorated with ref or out) in public or protected methods of public types.

Possible Messages

Key

Text

Severity

Disabled

out_parameter

Parameter definition in publicly accessible methods should not use the “out” modifier.

None

False

ref_parameter

Parameter definition in publicly accessible methods should not use the “ref” modifier.

None

False

Options

exclude_name_prefixes

exclude_name_prefixes : set[str] = {'Try'}

List of name prefixes of methods that should not be reported.