TextSpanHelper.ValidCoord(Source, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the given position is valid for the given source buffer.
public:
static bool ValidCoord(Microsoft::VisualStudio::Package::Source ^ src, int line, int pos);
public static bool ValidCoord (Microsoft.VisualStudio.Package.Source src, int line, int pos);
static member ValidCoord : Microsoft.VisualStudio.Package.Source * int * int -> bool
Public Shared Function ValidCoord (src As Source, line As Integer, pos As Integer) As Boolean
Parameters
- line
- Int32
[in] The line index of the position to test.
- pos
- Int32
[in] The column index of the position to test.
Returns
Returns true
if the given position lies within the given source buffer; otherwise, returns false
.
Remarks
The line
parameter must be greater than or equal to 0 and less than the number of lines in the source buffer. The pos
parameter must be greater than or equal to 0 and less than the number of characters on the specified line.
If the src
parameter is a null value, then the position is tested only for negative values.