ResXDataNode Class
Represents an element in an XML resource (.resx) file.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Name | Description | |
|---|---|---|
![]() | ResXDataNode(String^, Object^) | Initializes a new instance of the ResXDataNode class. |
![]() | ResXDataNode(String^, Object^, Func<Type^, String^>^) | Initializes a new instance of the ResXDataNode class. |
![]() | ResXDataNode(String^, ResXFileRef^) | Initializes a new instance of the ResXDataNode class with a reference to a resource file. |
![]() | ResXDataNode(String^, ResXFileRef^, Func<Type^, String^>^) | Initializes a new instance of the ResXDataNode class with a reference to a resource file. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetNodePosition() | Retrieves the position of the resource in the resource file. |
![]() | GetType() | |
![]() | GetValue(array<AssemblyName^>^) | Retrieves the object that is stored by this node by searching the specified assemblies. |
![]() | GetValue(ITypeResolutionService^) | Retrieves the object that is stored by this node by using the specified type resolution service. |
![]() | GetValueTypeName(array<AssemblyName^>^) | Retrieves the type name for the value by examining the specified assemblies. |
![]() | GetValueTypeName(ITypeResolutionService^) | Retrieves the type name for the value by using the specified type resolution service. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ISerializable::GetObjectData(SerializationInfo^, StreamingContext) | This API supports the product infrastructure and is not intended to be used directly from your code. Populates a SerializationInfo object with the data needed to serialize the target object. |
The ResXDataNode class supports the representation of rich data types within a resource file. It can support the storage of any object in a resource file, so long as the object supports serialization and type editors.
You can create a ResXDataNode object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the ResXResourceWriter::AddResource method.
To retrieve an existing ResXDataNode object, you must enumerate the ResXDataNode objects in an XML resource file by instantiating a ResXResourceReader object, setting the ResXResourceReader::UseResXDataNodes property to true, and calling the ResXResourceReader::GetEnumerator method to get an enumerator. The example provides an illustration.
The following example uses the ResXResourceReader::GetEnumerator method to obtain an IDictionaryEnumerator object that is used to enumerate the ResXDataNode objects in a .resx file. The example includes a CreateResourceFile routine that creates the necessary XML resource file.
for full trust for the immediate caller. This type cannot be used by partially trusted code.
Available since 2.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




Because the UseResXDataNodes property is true, the value of the IDictionaryEnumerator::Value property is a ResXDataNode object rather than the resource value. This makes a resource item's comment available from the ResXDataNode::Comment property.