Assert Method (Boolean, 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 _
)
[ConditionalAttribute("DEBUG")]
public static void Assert(
bool condition,
string message
)
[ConditionalAttribute(L"DEBUG")]
public:
static void Assert(
bool condition,
String^ message
)
[<ConditionalAttribute("DEBUG")>]
static member Assert :
condition:bool *
message:string -> unit
public static function Assert(
condition : boolean,
message : String
)
Parameters
- condition
Type: System. . :: . .Boolean
The condition to be evaluated. If the value is false, program execution stops.
- message
Type: System. . :: . .String
The text to be displayed if the assertion is false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.