Hi all,
One of our coding standards is not to use Custom labels in code, so only the default label of the case in a switch is allowed.
I dont think it can be detected but just i case i am mistaken i wanted to check here.
Greetings.
Hi all,
One of our coding standards is not to use Custom labels in code, so only the default label of the case in a switch is allowed.
I dont think it can be detected but just i case i am mistaken i wanted to check here.
Greetings.
Is it possible to detect the use of custom labels in code.
ChrisMM.
What check are you trying to enforce, exactly Can you post the bad pattern
You are correct that in most cases this analysis is impossible from FxCop, as switch/labels/gotos compile to branch operations in IL that are difficult or impossible to raise again to the original high-level source code.
Dave Wesst
Well that is all i wanted to know,
This check was only intended to make sure that our developers dont go off and use labels wherever they please, many of our developers dont have OO experience. So we wanted to warn them, ofcourse there are valid uses of labels, such as exiting nested loops.
But well i guesse thats what code reviews are for :-)