Document.FullName プロパティ

更新 : 2007 年 11 月

オブジェクトのファイルの完全パスと名前を取得します。

名前空間 :  EnvDTE
アセンブリ :  EnvDTE (EnvDTE.dll 内)

構文

'宣言
ReadOnly Property FullName As String
'使用
Dim instance As Document
Dim value As String

value = instance.FullName
string FullName { get; }
property String^ FullName {
    String^ get ();
}
function get FullName () : String

プロパティ値

型 : System.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);
}

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

Document インターフェイス

Document メンバ

EnvDTE 名前空間