Class Guard
Specifies that a certain condition is an error.
Inheritance
System.Object
Guard
Namespace: DotNetNuke.Common
Assembly: DotNetNuke.dll
Syntax
public static class Guard : object
Methods
| Improve this Doc View SourceAgainst(Boolean, String, Object[])
Indicates that the given condition
must not be true
, throwing an
Declaration
public static void Against(bool condition, string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | condition | if set to |
System.String | message | A message that describes the error condition, as a composite format string (i.e. with |
System.Object[] | args | An array of objects to fill in the placeholders in |
Against(Boolean, String)
Indicates that the given condition
must not be true
, throwing an
Declaration
public static void Against(bool condition, string message)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | condition | if set to |
System.String | message | A message that describes the error condition. |