Aracılığıyla paylaş


Document.Path Özellik

Belgeyi içeren dizinden için dosya adı olmadan yol alır.

Ad alanı:  EnvDTE
Derleme:  EnvDTE (EnvDTE.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Path As String
string Path { get; }
property String^ Path {
    String^ get ();
}
abstract Path : string with get
function get Path () : String

Özellik Değeri

Tür: String
Belgeyi içeren dizinden için dosya adı olmadan yol gösteren bir dizedir.

Notlar

Döndürülen yol dosya adı veya uzantısı dahil değildir.Örneğin, belge konumu C:\MsDev\Projects\MyProject\stdafx.cpp, daha sonra ise Path C:\MsDev\Projects\MyProject dize döndürür.c:\ gibi bir aygıtın kök yolu olmadığı sürece bitiş bir ters eğik çizgi yok.

Örnekler

Sub PathExample()
    Dim doc As Document
    Dim desc As String

    Set doc = DTE.ActiveDocument
    desc = "You are editing a "
    If (doc.ReadOnly) Then
        desc = desc & "read-only"
    Else
        desc = desc & "writable"
    End If
    desc = desc & " document called " & doc.Name & " located at " & doc.Path
    MsgBox desc
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Document Arabirim

EnvDTE Ad Alanı