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
)
参数
- line
类型:System.Int32
位置的行号。
- col
类型:System.Int32
在位置的行的偏移量。
返回值
类型:System.Int32
位置或字符偏移量开始源文件。
备注
此方法以 GetPositionOfLineIndex 方法的调用在 IVsTextLines 对象将对 Source 类构造函数。 ,如果发生错误,将引发异常。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。