I'm a VB guy that used to prefix module level variables with "_".
I'm using FXCop, StyleCop and (I think the built in Code Analysis, or maybe that is pointing to FXCop, not sure) and I am trying to adopt the most accepted naming conventions. How would you name the following module level private, property and param fields to make all of these code analysis tools happy and conform to commonly accepted or MS standards? Note that having a param name the same as a private module level field can be confusing and FXCop is incorrectly telling me to prefix the "sourcefile" param field reference with "this."
Is my approach to use lower case for module level privates acceptable and all I really need to do is rename the param to something unatural like "mySourceFile" or "sourceFileIn?" It feels forced. params should be Camel cased. Is my module level variable missed cased?
public class Restartability
{
private readonly string sourceFile;
public Restartability(string sourceFile)
{
this.sourceFile = sourceFile;
}
public string SourceFile
{
get { return sourceFile; }
}
}