TempFileCollection Constructor (String, Boolean)
Initializes a new instance of the TempFileCollection class using the specified temporary directory and specified value indicating whether to keep or delete the temporary files after their generation and use, by default.
Assembly: System (in System.dll)
The value of keepFiles is used to set the KeepFiles parameter. The temporary files in the collection are retained or deleted upon the completion of compiler activity based on the value of the KeepFiles property in the collection. As each file is added to the collection, the current value of KeepFiles is associated with it, unless it is added with a method that has a keepFile parameter, in which case that value is used for that specific file. When the Delete method is called, if KeepFiles is true, all files are deleted, including those added with a KeepFiles value of true. This allows specific files, those identified as being keep files, to be temporarily retained after compilation for purposes such as error reporting, then deleted when they are no longer needed.
for full trust for the immediate caller. This class cannot be used by partially trusted code.
Available since 1.1