Source.GetPositionOfLineIndex 方法

获取该位置与特定行和字符偏移位置相对应。

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

语法

声明
Public Function GetPositionOfLineIndex ( _
    line As Integer, _
    col As Integer _
) As Integer
public int GetPositionOfLineIndex(
    int line,
    int col
)

参数

返回值

类型:System.Int32
位置或字符偏移量开始源文件。

备注

此方法以 GetPositionOfLineIndex 方法的调用在 IVsTextLines 对象将对 Source 类构造函数。 ,如果发生错误,将引发异常。

.NET Framework 安全性

请参见

参考

Source 类

Microsoft.VisualStudio.Package 命名空间