See Also: ResXFileRef Members
The System.Resources.ResXFileRef class is used to include references to files in an XML resource (.resx) file. A System.Resources.ResXFileRef object represents a link to an external resource in an XML resource (.resx) file. You add the System.Resources.ResXFileRef object to a .resx file by calling the ResXResourceWriter.AddResource(ResXDataNode) method.
In a data entry in a .resx file, the type is System.Resources.ResXFileRef, and the value is the path location on disk. When the resource manager deserializes the object, the System.Resources.ResXFileRef performs the I/O to get the file. The following is an example of a .resx file.
Example
<data name="iconclip" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>lookout.bmp;System.Drawing.Bitmap, System.Drawing</value> </data> <data name="mailbackground" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>mailbackground.bmp;System.Drawing.Bitmap, System.Drawing</value> </data> <data name="xplogo" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>xplogo.png;System.Drawing.Bitmap, System.Drawing</value> </data>
To add a System.Resources.ResXFileRef object to a .resx file programmatically, you call the ResXDataNode.#ctor(string, ResXFileRef) constructor to instantiate a System.Resources.ResXDataNode object. You then pass this System.Resources.ResXDataNode object to the ResXResourceWriter.AddResource(ResXDataNode) method.
When you compile a .resx file with Resgen.exe (Resource File Generator), the resources specified in the .resx file are embedded in the resulting document resource file.