次の方法で共有


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 名前空間