Previously we showed you how to access the locals or variables of a method. Once you started to run your rule over an assembly, you might start to notice strange locals with names that start with ‘CS$’ and ‘VB$’. These are compiler generated locals that are outside the control of the user.
If you are writing a rule to check the names of locals, you will want to skip over these, To do this, simply pass the local to RuleUtilities.IsCompilerGenerated method and check the result.
Note: This will also skip over locals when source and line information (PDBs) is not alongside the assembly under analysis.