Freigeben über


Source.UncommentLines Method

Removes line comment characters from the beginning of each line in the given span.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Declaration
Public Overridable Function UncommentLines ( _
    span As TextSpan, _
    lineComment As String _
) As TextSpan
'Usage
Dim instance As Source
Dim span As TextSpan
Dim lineComment As String
Dim returnValue As TextSpan

returnValue = instance.UncommentLines(span, _
    lineComment)
public virtual TextSpan UncommentLines(
    TextSpan span,
    string lineComment
)
public:
virtual TextSpan UncommentLines(
    TextSpan span, 
    String^ lineComment
)
abstract UncommentLines : 
        span:TextSpan * 
        lineComment:string -> TextSpan 
override UncommentLines : 
        span:TextSpan * 
        lineComment:string -> TextSpan 
public function UncommentLines(
    span : TextSpan, 
    lineComment : String
) : TextSpan

Parameters

  • lineComment
    Type: System.String
    The characters that start a line comment.

Return Value

Type: Microsoft.VisualStudio.TextManager.Interop.TextSpan
A new TextSpan object describing the span after the line comment characters have been removed.

Remarks

Remove the leading line comment characters from the beginning of each line in the span.

The base method examines each line in the span and removes the first set of line comment characters from the beginning of the line, skipping any leading whitespace in the search. If the span's extent is zero, only the line specified as the starting line is examined.

This method is typically called from the UncommentSpan method.

.NET Framework Security

See Also

Reference

Source Class

Source Members

Microsoft.VisualStudio.Package Namespace