EditPoint.Line الخاصية
يحصل EditPointكائن للخط رقم.
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
ReadOnly Property Line As Integer
Get
int Line { get; }
property int Line {
int get ();
}
abstract Line : int
function get Line () : int
قيمة الخاصية
النوع: System.Int32
الخط رقم EditPointالكائن.
التطبيقات
ملاحظات
خط تبدأ الأرقام في واحد.
أمثلة
Public Sub Example(ByVal dte As DTE2)
Try
' Open a text document before running this example.
Dim objTD, objTD2 As TextDocument
Dim objEP As EditPoint
objTD = dte.ActiveDocument.Object("TextDocument")
objEP = objTD.StartPoint.CreateEditPoint()
objEP.Insert("Hello ")
'Show line number at editpoint.
MessageBox.Show("EditPoint is at line #: " + objEP.Line.ToString)
objTD2 = objEP.Parent
MessageBox.Show(objTD2.Type)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
public void Example(DTE2 dte)
{
try
{
// Open a text document before running this example.
TextDocument objTD, objTD2;
EditPoint objEP;
objTD = (TextDocument)dte.ActiveDocument.Object("TextDocument");
objEP = (EditPoint)objTD.StartPoint.CreateEditPoint();
objEP.Insert("Hello ");
//Show line number at editpoint.
MessageBox.Show("EditPoint is at line #: " + objEP.Line);
objTD2 = objEP.Parent;
MessageBox.Show(objTD2.Type);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
أمن NET Framework.
- الثقة الكاملة للمتصل الفوري. يتعذر استخدام هذا العضو بواسطة التعليمات البرمجية الموثوق بها جزئيًا. لمزيد من المعلومات، راجع باستخدام مكتبات من تعليمات برمجية موثوق بها جزئي.
راجع أيضًَا
المرجع
موارد أخرى
كيفية: الترجمة وإعادة تشغيل أمثلة التعليمات البرمجية لطراز كائن التنفيذ التلقائي