Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AssertUtils.State Method

Assert a bool expression, throwing

InvalidOperationException
if the expression is
false
.

[Visual Basic]
Public Shared Sub State( _
   ByVal expression As Boolean, _
   ByVal message As String _
)
[C#]
public static void State(
   bool expression,
   string message
);

Parameters

expression
a boolean expression.
message
The exception message to use if the assertion fails

Exceptions

Exception Type Condition
InvalidOperationException if expression is
false

See Also

AssertUtils Class | Spring.Util Namespace