次の方法で共有


TextSpanHelper.MakePositive(TextSpan) Method

Definition

Makes the given span positive.

public:
 static void MakePositive(Microsoft::VisualStudio::TextManager::Interop::TextSpan % span);
public:
 static void MakePositive(Microsoft::VisualStudio::TextManager::Interop::TextSpan &  span);
 static void MakePositive(Microsoft::VisualStudio::TextManager::Interop::TextSpan & span);
public static void MakePositive (ref Microsoft.VisualStudio.TextManager.Interop.TextSpan span);
static member MakePositive : TextSpan -> unit
Public Shared Sub MakePositive (ByRef span As TextSpan)

Parameters

span
TextSpan

[in] The TextSpan object to be modified.

Remarks

A positive span is one in which the start of the span is less than or equal to the end of the span. This method first determines whether the span is already positive and, if it is not, swaps the start and end points of the span. This means that if a span is already positive, this method does nothing.

Applies to