System.CodeDom.Compiler.TempFileCollection.AddExtension Method

Adds a file name with the specified file name extension to the collection.

Syntax

public string AddExtension (string fileExtension)

Parameters

fileExtension
The file name extension for the auto-generated temporary file name to add to the collection.

Returns

A file name with the specified extension that was just added to the collection.

Remarks

This method returns a file name with the specified extension that has been added to the temporary files collection. Other code must still create the file before it can be used.

This method can be called only once for each file name extension, because it will return the same name if it is called with the same extension.

Requirements

Namespace: System.CodeDom.Compiler
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0