Debug.WriteIf Method


Debug.WriteIf Method

Class

System.Diagnostics.Debug

Syntax

     Debug.WriteIf(condition, output[, category]) 


condition (required; Boolean)

Condition that must evaluate to true before output is sent to the debug listeners.


output (required; String or Object)

The string to be sent to the debug listener outputs. For Objects, the ToString method is used to access the string content.


category (optional; String)

A category name used to group output messages; the text is attached to the beginning of output.

Description

The WriteIf method prints text to the Output Window and other debug listeners when an application runs in the design-time environment, provided that condition is TRue.

Usage at a Glance

The Debug class features only work in the design-time environment; the statement has no effect in a compiled application. You do not have to remove Debug-related features from your code before release.

See Also

Debug Class, Debug.Write Method, Debug.WriteLine Method, Debug.WriteLineIf Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net