Indicates that the given condition must not be true, throwing an InvalidOperationException if it is.

Namespace: DotNetNuke.Common
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static void Against(
	bool condition,
	string message
)
Visual Basic
Public Shared Sub Against ( 
	condition As Boolean,
	message As String
)

Parameters

condition
Type: System..::..Boolean
if set to true, throws an InvalidOperationException.
message
Type: System..::..String
A message that describes the error condition.

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionWhen condition is true

See Also