Bagikan melalui


TeamFoundationTrace.WarningIf Method (Boolean, String, array<Object )

Conditionally writes a warning message to the trace output.

Namespace:  Microsoft.TeamFoundation
Assembly:  Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)

Syntax

'Declaration
Public Shared Sub WarningIf ( _
    condition As Boolean, _
    format As String, _
    ParamArray args As Object() _
)
public static void WarningIf(
    bool condition,
    string format,
    params Object[] args
)
public:
static void WarningIf(
    bool condition, 
    String^ format, 
    ... array<Object^>^ args
)
static member WarningIf : 
        condition:bool * 
        format:string * 
        args:Object[] -> unit 
public static function WarningIf(
    condition : boolean, 
    format : String, 
    ... args : Object[]
)

Parameters

  • condition
    Type: System.Boolean
    The condition that causes the message to be written to the trace output, if true.
  • format
    Type: System.String
    The string format to which args is applied.

Remarks

Uses the General category and Warning level.

.NET Framework Security

See Also

Reference

TeamFoundationTrace Class

WarningIf Overload

Microsoft.TeamFoundation Namespace