TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Rule:  8@106

This rule is Obsolete
Synopsis:Allow callers to prevent exceptions by providing a method or property that returns the object's state
Language:C#
Severity Level:8
Category:Exceptions


Description:

For example, consider a communication layer that will throw an InvalidOperationException when an attempt is made to call Send() when no connection is available. To allow preventing such a situation, provide a property such as Connected to allow the caller to determine if a connection is available before attempting an operation.