OpenFileDialog.SafeFileName 屬性

定義

取得對話方塊中選取之檔案的檔案名稱和副檔名。 檔案名稱不包含路徑。

public:
 property System::String ^ SafeFileName { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public string SafeFileName { get; }
[<System.ComponentModel.Browsable(false)>]
member this.SafeFileName : string
Public ReadOnly Property SafeFileName As String

屬性值

對話方塊中選取之檔案的檔案名稱和副檔名。 檔案名稱不包含路徑。 預設值為空字串。

屬性

備註

安全檔案名 (沒有路徑) 的檔案名和副檔名,可用來改善應用程式的安全性,因為它不會公開路徑資訊。 這個屬性應該可供以有限信任執行的程式碼存取。

適用於