Use Debug.Assert : Debug « Development « VB.Net Tutorial
- VB.Net Tutorial
- Development
- Debug
Imports System.IO
Module Module1
Sub Main()
Dim FileStr As StreamWriter
System.Diagnostics.Debug.Assert(Not (FileStr Is Nothing), "FileStr is NULL")
System.Diagnostics.Debug.Assert(Directory.Exists("\Temp"), "\Temp does not exist")
End Sub
End Module