TextSpanHelper.ValidCoord(Source, Int32, Int32) 方法

定义

确定给定的位置对于给定的源缓冲区是否有效。

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

参数

src
Source

Source 要验证的对象。 此值可以为 null 值。 请参阅“备注”。

line
Int32

中要测试的位置的行索引。

pos
Int32

中要测试的位置的列索引。

返回

Boolean

true如果给定位置位于给定的源缓冲区内,则返回; 否则返回 false

注解

line参数必须大于或等于0且小于源缓冲区中的行数。 pos参数必须大于或等于0且小于指定行中的字符数。

如果该 src 参数为 null 值,则仅为负值测试该位置。

适用于