TempFileCollection.KeepFiles 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當呼叫該方法或處理集合時,預設會取得或設定一個值,指示是否保留檔案 Delete() 。
public:
property bool KeepFiles { bool get(); void set(bool value); };
public bool KeepFiles { get; set; }
member this.KeepFiles : bool with get, set
Public Property KeepFiles As Boolean
屬性值
true檔案是否應該被保留;否則,。 false
備註
當AddExtension呼叫無keepFile參數的超載以加入暫存檔案時,該屬性的KeepFiles值作為預設值。 集合中的每個暫存檔案都有一個相關的保留檔案旗標,根據每個檔案決定該檔案是要保留還是刪除。 檔案會在編譯完成後根據其相關的保留檔案值自動保留或刪除。 然而,編譯完成後,保留的檔案可以透過設定 KeepFiles false 並呼叫該 Delete 方法來釋放。 這會導致所有檔案被刪除。