ResXDataNode(String, Object) Constructor

Initializes a new instance of the ResXDataNode class.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public ResXDataNode(
	string name,
	Object? value
)

Parameters

name  String
The name of the resource.
value  Object
The resource to store.

Remarks

Unlike System.Resources.ResXDataNode, KGySoft.Resources.ResXDataNode supports non-serializable types, too. See the details in the Remarks section of the ResXDataNode.

If value is another ResXDataNode instance the new ResXDataNode instance will be a copy of it with a possibly new name specified in the name parameter. A System.Resources.ResXDataNode instance is also recognized.

  Note

The compatibility with System.Resources.ResXDataNode is provided without any reference to System.Windows.Forms.dll, where that type is located.

If value is a ResXFileRef instance, the new ResXDataNode will refer to a file reference. A System.Resources.ResXFileRef instance is also recognized. For ResXFileRef a value with relative path you might want to use the ResXDataNode(string, ResXFileRef, string) constructor where you can specify a base path.

  Note

The compatibility with System.Resources.ResXFileRef is provided without any reference to System.Windows.Forms.dll, where that type is located.

Exceptions

ArgumentNullExceptionname is .
ArgumentExceptionname is a string of zero length.

See Also