StauffConsulting.Essentials.

Assert

C#: 
public sealed abstract class Assert :
    object

VB: 
Public NotInheritable MustInherit Class Assert
    Inherits Object

Type Ancestry:  Object
+---Assert


Wrapper class for static assertion functions.

Summary Info

Constructor Summary

Field Summary

Property Summary

Method Summary

Condition Throws an assertion if the given condition is false.
Condition Throws an assertion if the given condition is false.
MustOverride Use this for methods that would normally be abstract, but that can't be made abstract for some reason.
NotImplemented Indicates code that has not been implemented yet. This is intended for unimplemented API's, not user features.
NotNull Throws an assertion if the given object reference is null.
NotNull Throws an assertion if the given object reference is null.
NotReached Indicates code that should never be reached. Use for otherwise dangling else and default clauses. Always throws an assertion.
NotReached Indicates code that should never be reached. Use for otherwise dangling else and default clauses. Always throws an assertion.

Miscellany Summary

Method Details


Condition

C#: 
static Void Condition(bool b)

VB: 
Shared Function Condition(ByVal b As Boolean) As Void

Throws an assertion if the given condition is false.

Parameters

b   The condition.


Condition

C#: 
static Void Condition(bool b,
    string descr)

VB: 
Shared Function Condition(ByVal b As Boolean, ByVal descr As String) As Void

Throws an assertion if the given condition is false.

Parameters

b   The condition.
descr  


MustOverride

C#: 
static Void MustOverride()

VB: 
Shared Function [MustOverride]() As Void

Use this for methods that would normally be abstract, but that can't be made abstract for some reason.


NotImplemented

C#: 
static Void NotImplemented()

VB: 
Shared Function NotImplemented() As Void

Indicates code that has not been implemented yet. This is intended for unimplemented API's, not user features.


NotNull

C#: 
static Void NotNull(object obj,
    string why)

VB: 
Shared Function NotNull(ByVal obj As Object, ByVal why As String) As Void

Throws an assertion if the given object reference is null.

Parameters

obj  
why  


NotNull

C#: 
static Void NotNull(object obj)

VB: 
Shared Function NotNull(ByVal obj As Object) As Void

Throws an assertion if the given object reference is null.

Parameters

obj  


NotReached

C#: 
static Void NotReached()

VB: 
Shared Function NotReached() As Void

Indicates code that should never be reached. Use for otherwise dangling else and default clauses. Always throws an assertion.


NotReached

C#: 
static Void NotReached(string why)

VB: 
Shared Function NotReached(ByVal why As String) As Void

Indicates code that should never be reached. Use for otherwise dangling else and default clauses. Always throws an assertion.

Parameters

why  


generated by DocGenDotNet on 18 Nov 2008 6:35:01 PM