Document.FullName Property

 

Gets the full path and name of the object's file.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

string FullName { get; }

Property Value

Type: System.String

A string representing the full path and name of the object's file.

The FullName property is known as the FileName property in some versions of Visual Studio.


public void FullNameExample(DTE2 dte)
{
    dte.ItemOperations.NewFile(@"General\Text File", "", 
        Constants.vsViewKindPrimary);

    Document doc = dte.ActiveDocument;

    // Display the new document's temporary location.
    MessageBox.Show(doc.ActiveWindow.Caption + " is stored at " + 
        doc.FullName);
}
Return to top
Show: