共用方式為


Document.FullName 屬性

取得物件檔案的完整路徑和名稱。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
ReadOnly Property FullName As String
string FullName { get; }
property String^ FullName {
    String^ get ();
}
abstract FullName : string with get
function get FullName () : String

屬性值

類型:String
表示物件的檔案完整路徑和名稱的字串。

備註

FullName 屬性在 Visual Studio 的某些版本中稱為 FileName 屬性。

範例

Sub FullNameExample(ByVal dte As DTE2)

    dte.ItemOperations.NewFile()

    Dim doc As Document = dte.ActiveDocument

    ' Display the new document's temporary location.
    MsgBox(doc.ActiveWindow.Caption & " is stored at " & doc.FullName)

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

.NET Framework 安全性

請參閱

參考

Document 介面

EnvDTE 命名空間