Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the line number of the EditPoint object.
Namespace: EnvDTE80
Assembly: EnvDTE80 (in EnvDTE80.dll)
Syntax
'Declaration
ReadOnly Property Line As Integer
'Usage
Dim instance As EditPoint2
Dim value As Integer
value = instance.Line
int Line { get; }
property int Line {
int get ();
}
function get Line () : int
Property Value
Type: System.Int32
The line number of the EditPoint object.
Implements
Remarks
Line numbers start at one.
Examples
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 Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples