How to implement following rule in StyleCop+: Do not change the value of method arguments.

Aug 9, 2012 at 1:05 PM

I need to implement following rule in StyleCop+:
Do not change the value of method arguments.


Example:
void Function1(int a, int b)
{
 a = a + b;
}

It should throw warning at "Function1" level as do not change the value of parameter "a".

Do any one have idea how to achieve this rule?

Coordinator
Aug 9, 2012 at 1:16 PM
This really shouldn't be checked for in stylecop.

It's not a style issue.

Fxcop maybe.


~A.

On 9 Aug 2012, at 14:05, AnkushJ <notifications@codeplex.com> wrote:

From: AnkushJ

I need to implement following rule in StyleCop+:
Do not change the value of method arguments.


Example:
void Function1(int a, int b)
{
a = a + b;
}

It should throw warning at "Function1" level as do not change the value of parameter "a".

Do any one have idea how to achieve this rule?