Condividi tramite


Source.ScanToNonWhitespaceChar Method

Returns the offset of the first non-whitespace character on the given line.

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

'Dichiarazione
Public Function ScanToNonWhitespaceChar ( _
    line As Integer _
) As Integer
'Utilizzo
Dim instance As Source
Dim line As Integer
Dim returnValue As Integer

returnValue = instance.ScanToNonWhitespaceChar(line)
public int ScanToNonWhitespaceChar(
    int line
)
public:
int ScanToNonWhitespaceChar(
    int line
)
member ScanToNonWhitespaceChar : 
        line:int -> int 
public function ScanToNonWhitespaceChar(
    line : int
) : int

Parameters

Return Value

Type: System.Int32
A character offset to the first non-whitespace character.

Remarks

This helper method is used primarily by the comment/uncomment methods to skip any leading whitespace on a line. This method can throw an exception if the line number is out of bounds.

If the line is empty or contains only whitespace, the offset returned equals the length of the line.

.NET Framework Security

See Also

Reference

Source Class

Source Members

Microsoft.VisualStudio.Package Namespace