مشاركة عبر


EditPoint2.Delete أسلوب (Object)

Deletes the specified range of نص.

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

بناء الجملة

'إقرار
Sub Delete ( _
    PointOrCount As Object _
)
void Delete(
    Object PointOrCount
)
void Delete(
    [InAttribute] Object^ PointOrCount
)
abstract Delete : 
        PointOrCount:Object -> unit 
function Delete(
    PointOrCount : Object
)

المعلمات

  • PointOrCount
    النوع: System.Object
    مطلوبة.Represents either a TextPoint كائن أو a رقم of حرف/ حروف.

التطبيقات

EditPoint.Delete(Object)

ملاحظات

إذا PointOrCountهو TextPointكائن، Deleteقم بحذف نص الموجود بين يؤشر التحرير و PointOrCount. إذا PointOrCountهو عددا صحيحاً، ثم Deleteيحذف نص من التحرير الإشارة من خلال عدد محدد من حرف/ حروف التي تتبع اليؤشر التحرير، قم بإضافة واحدة لكل تسلسل السطر الجديد ضمني في إنهاء كل سطر.

إذا PointOrCountهو سالبة، ثم Deleteقم بحذف نص قبل يؤشر التحرير.

أمثلة

Sub DeleteExample()
   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
        
   ' Change the first letter of the fourth word of the fourth line.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.CharRight(2)
   objEditPt.Charleft(2)
   objeditpt.Delete(1)
   objEditPt.Insert("p")
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint2 واجهة

EditPoint2 الأعضاء

Delete التحميل الزائد

EnvDTE80 مساحة الاسم