System.Resources.ResourceWriter.Generate Method

Saves all resources to the output stream in the system default format.

Syntax

public void Generate ()

Remarks

The ResourceWriter.Generate method is called implicitly by the ResourceWriter.Close method if it is not called by your application code.

ResourceWriter.Generate can only be called once, after all calls to ResourceWriter.AddResource(string, string) and ResourceWriter.AddResourceData(string, string, Byte[]) have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information.

ResourceWriter.Generate does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call ResourceWriter.Close after calling ResourceWriter.Generate, or simply call ResourceWriter.Close.

Requirements

Namespace: System.Resources
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0