VsTextBufferClass.GetLineText 方法

返回中指定的大小将 BSTR 的。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
Public Overridable Function GetLineText ( _
    iStartLine As Integer, _
    iStartIndex As Integer, _
    iEndLine As Integer, _
    iEndIndex As Integer, _
    <OutAttribute> ByRef pbstrBuf As String _
) As Integer
public virtual int GetLineText(
    int iStartLine,
    int iStartIndex,
    int iEndLine,
    int iEndIndex,
    out string pbstrBuf
)
public:
virtual int GetLineText(
    [InAttribute] int iStartLine, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndLine, 
    [InAttribute] int iEndIndex, 
    [OutAttribute] String^% pbstrBuf
)
abstract GetLineText : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pbstrBuf:string byref -> int  
override GetLineText : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int * 
        pbstrBuf:string byref -> int
public function GetLineText(
    iStartLine : int, 
    iStartIndex : int, 
    iEndLine : int, 
    iEndIndex : int, 
    pbstrBuf : String
) : int

参数

  • iStartLine
    类型:Int32

    [in] 启动行。

  • iStartIndex
    类型:Int32

    [in] 行中的起始字符的索引。 此值必须小于或等于行的长度。

  • iEndLine
    类型:Int32

    [in] 结束行。

  • iEndIndex
    类型:Int32

    [in] 在行内结束字符索引。 此值必须小于或等于行的长度。

  • pbstrBuf
    类型:String%

    [out] 要插入的文本,因此,如果有的话)。

返回值

类型:Int32

实现

IVsTextLines.GetLineText(Int32, Int32, Int32, Int32, String%)

.NET Framework 安全性

请参阅

参考

VsTextBufferClass 类

Microsoft.VisualStudio.TextManager.Interop 命名空间