Locked Checking the number of elseif statements in a loop

  • Friday, August 05, 2005 10:47 AM
     
     
    Hi All
    Can any 1 help me. I want to write a rule to check the number of elseif conditions in a if statement. 
    Can any one write to me if it possible to write this type of rule and if it is possible then how to go ahead with this.

    Thanks
    Biswa

All Replies

  • Friday, August 05, 2005 12:59 PM
     
     Answered

    FxCop can (currently) only scan compiled assemblies (DLLs and EXEs).  All source-level branching commands (if, elseif, etc) turn into general-purpose CIL commands (brfalse, blt, etc)... the same CIL instructions can be generated a variety of ways, so you can never really be sure what was originally there.

    -Ryan / Kardax