Share via


TestContext.WriteLine Method

When overridden in a derived class, used to write trace messages while the test is running.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public MustOverride Sub WriteLine ( _
    format As String, _
    ParamArray args As Object() _
)
public abstract void WriteLine(
    string format,
    params Object[] args
)
public:
virtual void WriteLine(
    String^ format, 
    ... array<Object^>^ args
) abstract
abstract WriteLine : 
        format:string * 
        args:Object[] -> unit
public abstract function WriteLine(
    format : String, 
    ... args : Object[]
)

Parameters

  • format
    Type: String

    The string that contains the trace message.

  • args
    Type: array<Object[]

    Arguments to add to the trace message.

.NET Framework Security

See Also

Reference

TestContext Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Other Resources

Using the TestContext Class