Debug.Print Debug.Print Debug.Print Debug.Print Method

Definition

Writes a message followed by a line terminator to the trace listeners in the Listeners collection.

Overloads

Print(String) Print(String) Print(String) Print(String)

Writes a message followed by a line terminator to the trace listeners in the Listeners collection.

Print(String, Object[]) Print(String, Object[]) Print(String, Object[]) Print(String, Object[])

Writes a formatted string followed by a line terminator to the trace listeners in the Listeners collection.

Print(String) Print(String) Print(String) Print(String)

Writes a message followed by a line terminator to the trace listeners in the Listeners collection.

public:
 static void Print(System::String ^ message);
[System.Diagnostics.Conditional("DEBUG")]
public static void Print (string message);
static member Print : string -> unit
Public Shared Sub Print (message As String)

Parameters

message
String String String String

The message to write.

Remarks

The default line terminator is a carriage return followed by a line feed. By default, the output is written to an instance of DefaultTraceListener.

Print(String, Object[]) Print(String, Object[]) Print(String, Object[]) Print(String, Object[])

Writes a formatted string followed by a line terminator to the trace listeners in the Listeners collection.

public:
 static void Print(System::String ^ format, ... cli::array <System::Object ^> ^ args);
[System.Diagnostics.Conditional("DEBUG")]
public static void Print (string format, params object[] args);
static member Print : string * obj[] -> unit
Public Shared Sub Print (format As String, ParamArray args As Object())

Parameters

format
String String String String

A composite format string that contains text intermixed with zero or more format items, which correspond to objects in the args array.

args
Object[]

An object array containing zero or more objects to format.

Exceptions

format is invalid.

-or-

The number that indicates an argument to format is less than zero, or greater than or equal to the number of specified objects to format.

Remarks

This method uses the of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. By default, the output is written to an instance of DefaultTraceListener.

See also

Applies to