As per MSDN:
A code block is a code path with a single entry point, a single exit point, and a set of instructions that are all run in sequence. A code block ends when it reaches a decision point such as a new conditional statement block, a function call, exception throw, enter, leave, try, catch, or a finally construct.
With this in mind, I still have no idea why, according to VS2010's code coverage analysis, this method has three blocks:
public Type Foo()
{
return typeof(string);
}
And this method has two blocks:
public void FooTwo()
{
return;
}
Code lines are more straightforward. They're the number of lines of code including curly brackets. But what are code blocks?
Calvin