Share via


OpenFileDialog.SafeFileNames 屬性

定義

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

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

屬性值

String[]

對話方塊中所有選取檔案之檔案名稱和副檔名的陣列。 檔案名稱不包含路徑。 如果未選取檔案,則會傳回空陣列。

屬性

備註

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

適用於