mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Resources.IResourceWriter System.Runtime.InteropServices.ComVisible(true)

provides a default implementation of the interface. It enables you to programmatically create a binary resource (.resources) file.

Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream.

To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call .

The resources will not necessarily be written in the same order they were added.

To retrieve resources from a binary .resources file created by the class, you can use the class, which lets you retrieve named resources, or the class, which lets you enumerate all the resources in the file.

Writes resources in the system-default format to an output file or an output stream. This class cannot be inherited.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  To be added

  Initializes a new instance of the class that writes the resources to the provided stream.

  The output stream.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  To be added

  Initializes a new instance of the class that writes the resources to the specified file.

  The output file name.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The resource is not written until is called.

  You can retrieve the resources written by the method by calling the method.

  Adds a named resource specified as a byte array to the list of resources to be written.

  The name of the resource. Value of the resource as an 8-bit unsigned integer array.
- Method
  4.0.0.0
  System.Void `` ``

  You can specify any stream that supports the property for .

  You can retrieve the resources written by the method by calling the method.

  Adds a named resource specified as a stream to the list of resources to be written.

  The name of the resource to add. The value of the resource to add. The resource must support the property.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  must be serializable.

  The resource is not written until the method is called.

  You can retrieve the resources written by the method by calling the method.

  Adds a named resource specified as an object to the list of resources to be written.

  The name of the resource. The value of the resource.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The resource is not written until is called.

  You can retrieve the resources written by the method by calling the method.

  Adds a string resource to the list of resources to be written.

  The name of the resource. The value of the resource.
- Method
  4.0.0.0
  System.Void `` `` ``

  You can specify any stream that supports the property for .

  You can retrieve the resources written by the method by calling the method.

  Adds a named resource specified as a stream to the list of resources to be written, and specifies whether the stream should be closed after the method is called.

  The name of the resource to add. The value of the resource to add. The resource must support the property. true to close the stream after the method is called; otherwise, false.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  Use the method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor.

  is a string that represents the data type of the resource. It can be any of the following values:

  The string representation of a ResourceTypeCode enumeration member that indicates the data type of the resource. ResourceTypeCode is a private enumeration that is used by Resgen.exe to indicate that a special binary format is used to store one of 19 common data types. These include the .NET Framework primitive data types (, , , , , , , , , , , , ), as well as , , and . In addition, the ResourceTypeCode enumeration includes the values shown in the following table.

  ResourceTypeCode value

  Description

  ResourceTypeCode.ByteArray

  The data is a byte array.

  ResourceTypeCode.Null

  The data is a null reference.

  ResourceTypeCode.Stream

  The data is stored in a stream.

  A string that contains the fully qualified name of the type whose binary data is assigned to the argument (for example, System.String). In addition, for types that are not part of the .NET Framework class library, the string includes the name, version, culture, and public key of the assembly that contains the type. For example, the following string indicates that the serialized data represents an instance of the Person type in the Extensions namespace, which is found in version 1.0 of an assembly named Utility that has no public key and no designated culture.

  Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

  A parallel method for reading resource data written with the method is .

  Adds a unit of data as a resource to the list of resources to be written.

  A name that identifies the resource that contains the added data. The type name of the added data. For more information, see the Remarks section. A byte array that contains the binary representation of the added data.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  is called implicitly by , if required.

  Saves the resources to the output stream and then closes it.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  The implementation of this method is the same as .

  Allows users to close the resource file or stream, explicitly releasing resources.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

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

  can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information.

  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 after calling , or simply call .

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

- Property
  4.0.0.0
  System.Func<System.Type,System.String> To be added.

  vs_dev10_long and MSBuild set this property if you target an earlier version of the .NET Framework.

  Gets or sets a delegate that enables resource assemblies to be written that target versions of the .NET Framework prior to the net_v40_long by using qualified assembly names.