語言

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[]

對話框中所有選取檔案的檔案名稱與副檔名陣列。 檔案名稱中不包含路徑。 若未選取任何檔案,則會回傳一個空陣列。

屬性

備註

安全的檔名(僅檔名與副檔名,無路徑)可用於提升應用程式安全性,因為它不會暴露路徑資訊。 這個屬性應該能讓執行程式碼且信任有限的程式碼存取。

適用於