Name
Debug.WriteIf Method
Class
System.Diagnostics.Debug
Syntax
Debug.WriteIf(condition, message[, Category]
)
or:
Debug.WriteIf(condition, value[, Category]
)
-
condition
Use: Required
Data Type: Boolean
Condition required for output to proceed
-
message
Use: Required
Data Type: String
The string to be sent to the Output window, or the object whose name is to be sent to the Output window
-
value
Use: Required
Data Type: Any
An object whose name is to be sent to the Output window
-
Category
Use: Optional
Data Type: String
A category name used to group output messages
Description
Prints text in the Output window in the design-time environment,
provided that condition
is
True
Rules at a Glance
This method behaves identically to Debug.Write, with the exception
that nothing is output unless condition
is
True
.
Get VB .NET Language in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.