• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

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 Source

Against(Boolean, String, Object[])

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

Declaration
public static void Against(bool condition, string message, params object[] args)
Parameters
Type Name Description
System.Boolean condition

if set to true, throws an .

System.String message

A message that describes the error condition, as a composite format string (i.e. with {0} placeholders, like ).

System.Object[] args

An array of objects to fill in the placeholders in message.

| Improve this Doc View Source

Against(Boolean, String)

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

Declaration
public static void Against(bool condition, string message)
Parameters
Type Name Description
System.Boolean condition

if set to true, throws an .

System.String message

A message that describes the error condition.

  • View Source
Back to top by the community, for the community... #DNNCMS