- Start Visual Studio, navigate to File | New | Project..., create a new C# class library project, and replace the code in Class1.cs with code from the code sample at ClassLibrary/Class1.cs.
- Click on Tools | Options to bring up the tools options dialog and navigate to the C# code style options (Text Editor | C# | Code Style | General):
- Change the Severity of 'this.' preferences to Suggestion, predefined type preferences to Warning, and 'var' preferences to Error. Change the Preference of 'var' preferences from Prefer explicit type to Prefer 'var':
- Change the Severity of Code block preferences to Warning and change the ...