共用方式為


TempFileCollection.KeepFiles 屬性

定義

當呼叫該方法或處理集合時,預設會取得或設定一個值,指示是否保留檔案 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 方法來釋放。 這會導致所有檔案被刪除。

適用於