Send comments on this topic. |
|
Cause
Rule Description
Some types of C# statements can only be used when chained to the bottom of another statement. Examples include catch and finally statements, which must always be chained to the bottom of a try-statement. Another example is an else-statement, which must always be chained to the bottom of an if-statement, or to another else-statement. These types of chained statements must not be separated by a blank line. For example:
try
{
this.SomeMethod();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
How to Fix Violations
© Microsoft Corporation. All Rights Reserved.