Path.InvalidPathChars 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Path.InvalidPathChars has been deprecated. Use GetInvalidPathChars or GetInvalidFileNameChars instead.
警告
Please use GetInvalidPathChars or GetInvalidFileNameChars instead.
提供平台專用的字元陣列,無法在傳遞給類別成員 Path 的路徑字串參數中指定。
public: static initonly cli::array <char> ^ InvalidPathChars;
[System.Obsolete("Path.InvalidPathChars has been deprecated. Use GetInvalidPathChars or GetInvalidFileNameChars instead.")]
public static readonly char[] InvalidPathChars;
[System.Obsolete("Please use GetInvalidPathChars or GetInvalidFileNameChars instead.")]
public static readonly char[] InvalidPathChars;
public static readonly char[] InvalidPathChars;
[<System.Obsolete("Path.InvalidPathChars has been deprecated. Use GetInvalidPathChars or GetInvalidFileNameChars instead.")>]
staticval mutable InvalidPathChars : char[]
[<System.Obsolete("Please use GetInvalidPathChars or GetInvalidFileNameChars instead.")>]
staticval mutable InvalidPathChars : char[]
staticval mutable InvalidPathChars : char[]
Public Shared ReadOnly InvalidPathChars As Char()
欄位值
- 屬性
備註
此方法回傳的陣列不保證包含檔案名稱與目錄名稱中無效的全部字元集合。 無效字元的完整集合會因檔案系統而異。 請參閱 GetInvalidPathChars() 備註以了解此欄位回傳的字元集合。
注意事項
如果你認為你的程式碼可能和不受信任的程式碼在同一個應用域執行,就不要使用 InvalidPathChars 。 InvalidPathChars 是一個陣列,因此其元素可以被覆寫。 如果不受信任的程式碼覆蓋了 的 InvalidPathChars某些元素,可能會導致你的程式碼出現故障,進而可能被利用。