ResXResourceSetSetObject Method
Adds or replaces a resource object in the current
ResXResourceSet with the specified
name.
Namespace: KGySoft.ResourcesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public void SetObject(
string name,
Object? value
)
Public Sub SetObject (
name As String,
value As Object
)
public:
virtual void SetObject(
String^ name,
Object^ value
) sealed
abstract SetObject :
name : string *
value : Object -> unit
override SetObject :
name : string *
value : Object -> unit
- name String
- Name of the resource to set. Casing is not ignored.
- value Object
- The resource value to set.
IExpandoResourceSetSetObject(String, Object) If value is , a null reference will be explicitly stored.
Its effect is similar to the RemoveObject method (GetObject will return in both cases),
but if has been set, it will returned among the results of the GetEnumerator method.
value can be a ResXDataNode as well, its value will be interpreted correctly and added to the ResXResourceSet with the specified name.
If value is a ResXFileRef, then a file reference will be added to the ResXResourceSet.
On saving its path will be made relative to the specified basePath argument of the Save methods.
If forceEmbeddedResources is on saving, the file references will be converted to embedded ones.
Not just
ResXDataNode and
ResXFileRef are handled but
System.Resources.ResXDataNode
and
System.Resources.ResXFileRef as well. The compatibility with the system versions
is provided without any reference to
System.Windows.Forms.dll, where those types are located.