مشاركة عبر


EditPoint.GetLines أسلوب

يحصل على سلسلة أحرف يمثل نص بين الثاني إعطاء الخطوط.

مساحة الاسم:  EnvDTE
التجميع:  EnvDTE (في EnvDTE.dll)

بناء الجملة

'إقرار
Function GetLines ( _
    Start As Integer, _
    ExclusiveEnd As Integer _
) As String
string GetLines(
    int Start,
    int ExclusiveEnd
)
String^ GetLines(
    [InAttribute] int Start, 
    [InAttribute] int ExclusiveEnd
)
abstract GetLines : 
        Start:int * 
        ExclusiveEnd:int -> string 
function GetLines(
    Start : int, 
    ExclusiveEnd : int
) : String

المعلمات

  • Start
    النوع: System.Int32
    اختياري.رقم السطر أخير إلى تضمين هذا نص.
  • ExclusiveEnd
    النوع: System.Int32
    مطلوبة.السطر أول رقم بتضمين هذا نص.

القيمة المُرجعة

النوع: System.String
نص الموجود بين خطين معطى.

ملاحظات

تمثل سلسلة يتم إرجاع نص بين Start(ضمناً) و ExclusiveEnd(خاص). يتضمن السلسلة أحرف السطر الجديد (حرف ACSII 13) لخط الحدود، و تنتهي بحرف السطر الجديد في حالة إنهاء السطر أخير في حرف السطر الجديد.

أمثلة

Sub GetLinesExample()
   Dim objTextDoc As TextDocument
   Dim objEditPt As EditPoint, iCtr As Integer
        
   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")
        
   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objEditPt = objTextDoc.StartPoint.CreateEditPoint
        
   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objeditpt.Insert("This is a test." & Chr(13))
   Next iCtr
   objEditPt.StartOfDocument()
   msgbox("The results of GetLines: " & Chr(13) & objeditpt.GetLines(1, 6))
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint واجهة

EditPoint الأعضاء

EnvDTE مساحة الاسم