TextSpanHelper.ValidCoord 方法

确定给定位置是否为特定源缓冲区是有效的。

命名空间:  Microsoft.VisualStudio.Package
程序集:   Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)

语法

声明
Public Shared Function ValidCoord ( _
    src As Source, _
    line As Integer, _
    pos As Integer _
) As Boolean
public static bool ValidCoord(
    Source src,
    int line,
    int pos
)

参数

  • line
    类型:System.Int32
    [in] 测试的位置的行索引。
  • pos
    类型:System.Int32
    [in] 测试的位置的列索引。

返回值

类型:System.Boolean
,如果给定位置在特定源缓冲区,则返回; true 否则,返回 false。

备注

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

如果 src 参数是一个空值,则该位置为负值只测试。

.NET Framework 安全性

请参见

参考

TextSpanHelper 类

Microsoft.VisualStudio.Package 命名空间