Partager via


EditPoint2.Line, propriété

Obtient le numéro de ligne de l'objet EditPoint.

Espace de noms :  EnvDTE80
Assembly :  EnvDTE80 (dans EnvDTE80.dll)

Syntaxe

'Déclaration
ReadOnly Property Line As Integer
    Get
int Line { get; }
property int Line {
    int get ();
}
abstract Line : int
function get Line () : int

Valeur de propriété

Type : System.Int32
Numéro de ligne de l'objet EditPoint.

Implémentations

EditPoint.Line

Notes

La numérotation des lignes débute à 1.

Exemples

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);
   }
}

Sécurité .NET Framework

Voir aussi

Référence

EditPoint2 Interface

Line, surcharge

EnvDTE80, espace de noms

Autres ressources

Comment : compiler et exécuter les exemples de code du modèle objet Automation