D
Dave
Hi,
I need a little help in understanding why FxCop complains about this.
If I have a basic class like:
class Class1
{
static void Main()
{
Class1 class1 = new Class1();
class1.Do("Something");
}
public void Do(string PassedInString)
{
Console.WriteLine("String passed in is " + PassedInString);
}
}
Problem is that although this compiles OK and works as expected (most of my
C# books are full of examples just like this) FxCop complains because of an
unused parameter in the Do method. It basically says to use the "this"
keyword or make the method static.
In a project I have FxCop reports some methods and not others so I am unsure
what it is actually reporting, whether it is a problem and what the best
solution should be.
Thanks,
Dave.
I need a little help in understanding why FxCop complains about this.
If I have a basic class like:
class Class1
{
static void Main()
{
Class1 class1 = new Class1();
class1.Do("Something");
}
public void Do(string PassedInString)
{
Console.WriteLine("String passed in is " + PassedInString);
}
}
Problem is that although this compiles OK and works as expected (most of my
C# books are full of examples just like this) FxCop complains because of an
unused parameter in the Do method. It basically says to use the "this"
keyword or make the method static.
In a project I have FxCop reports some methods and not others so I am unsure
what it is actually reporting, whether it is a problem and what the best
solution should be.
Thanks,
Dave.