TextSpanHelper.MakePositive Method
Makes the given span positive.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
Syntax
'Declaration
Public Shared Sub MakePositive ( _
ByRef span As TextSpan _
)
public static void MakePositive(
ref TextSpan span
)
public:
static void MakePositive(
TextSpan% span
)
static member MakePositive :
span:TextSpan byref -> unit
public static function MakePositive(
span : TextSpan
)
Parameters
span
Type: Microsoft.VisualStudio.TextManager.Interop.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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.