IExpandoResourceSetSetObject Method
Namespace: KGySoft.ResourcesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
void SetObject(
string name,
Object? value
)
Sub SetObject (
name As String,
value As Object
)
void SetObject(
String^ name,
Object^ value
)
abstract SetObject :
name : string *
value : Object -> unit
Parameters
- name String
- Name of the resource value to set.
- value Object
- The resource value to set. If , a null reference will be explicitly stored.
If value is , and this IExpandoResourceSet instance
is a hybrid resource set, GetObject will always return , even if name is
defined in the original binary resource set. Thus you can force to take the parent resource set for example in case of a HybridResourceManager.
To remove the user-defined content and reset the original resource defined in the binary resource set (if any), use
the RemoveObject method.
value can be a ResXDataNode as well, its value will be interpreted correctly and added to the IExpandoResourceSet with the specified name.
If value is a ResXFileRef, then a file reference will be added to the IExpandoResourceSet.
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.