Returns the offset of the first non-whitespace character on the given line.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'宣言
Public Function ScanToNonWhitespaceChar ( _
line As Integer _
) As Integer
'使用
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
)
public function ScanToNonWhitespaceChar(
line : int
) : int
Parameters
line
Type: System.Int32The line number to examine.
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.
Permissions
- 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.