OpenFileDialog.SafeFileNames 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
對話框中選取的所有檔案會獲得一組檔案名稱和副檔名的陣列。 檔案名稱中不包含路徑。
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[]
對話框中所有選取檔案的檔案名稱與副檔名陣列。 檔案名稱中不包含路徑。 若未選取任何檔案,則會回傳一個空陣列。
- 屬性
備註
安全的檔名(僅檔名與副檔名,無路徑)可用於提升應用程式安全性,因為它不會暴露路徑資訊。 這個屬性應該能讓執行程式碼且信任有限的程式碼存取。