Assert Method (Boolean, String, String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Causes a break in execution if the specified assertion (condition) evaluates to false.

Namespace:  Microsoft.SPOT
Assembly:  Microsoft.SPOT.Native (in Microsoft.SPOT.Native.dll)

Syntax

'Declaration
<ConditionalAttribute("DEBUG")> _
Public Shared Sub Assert ( _
    condition As Boolean, _
    message As String, _
    detailedMessage As String _
)
[ConditionalAttribute("DEBUG")]
public static void Assert(
    bool condition,
    string message,
    string detailedMessage
)
[ConditionalAttribute(L"DEBUG")]
public:
static void Assert(
    bool condition, 
    String^ message, 
    String^ detailedMessage
)
[<ConditionalAttribute("DEBUG")>]
static member Assert : 
        condition:bool * 
        message:string * 
        detailedMessage:string -> unit 
public static function Assert(
    condition : boolean, 
    message : String, 
    detailedMessage : String
)

Parameters

  • condition
    Type: System. . :: . .Boolean
    The condition to be evaluated. If the value is false, program execution stops.
  • detailedMessage
    Type: System. . :: . .String
    The detailed message to be displayed if the assertion is false.

.NET Framework Security

See Also

Reference

Debug Class

Assert Overload

Microsoft.SPOT Namespace