DynamicResourceManagerSetObject Method
Adds or replaces a resource object in the current
DynamicResourceManager with the specified
name for the specified
culture.
Namespace: KGySoft.ResourcesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public override void SetObject(
string name,
Object? value,
CultureInfo? culture = null
)
Public Overrides Sub SetObject (
name As String,
value As Object,
Optional culture As CultureInfo = Nothing
)
public:
virtual void SetObject(
String^ name,
Object^ value,
CultureInfo^ culture = nullptr
) override
abstract SetObject :
name : string *
value : Object *
?culture : CultureInfo
(* Defaults:
let _culture = defaultArg culture null
*)
-> unit
override SetObject :
name : string *
value : Object *
?culture : CultureInfo
(* Defaults:
let _culture = defaultArg culture null
*)
-> unit
- name String
- The name of the resource to set.
- value Object
- The value of the resource to set. If , then a null reference will be explicitly
stored for the specified culture. This parameter is optional.
Default value: . - culture CultureInfo (Optional)
- The culture of the resource to set. If this value is ,
the CultureInfo object is obtained by using the CultureInfo.CurrentUICulture property.
IExpandoResourceManagerSetObject(String, Object, CultureInfo) If value is , a null reference will be explicitly stored.
As a result, the subsequent GetObject calls
with the same culture will fall back to the parent culture, or will return if
name is not found in any parent cultures. However, enumerating the result set returned by
GetExpandoResourceSet and GetResourceSet methods will return the resources with value.
If you want to remove the user-defined ResX content and reset the original resource defined in the binary resource set (if any), use the RemoveObject method.
If you use the
DynamicResourceManager with some enabled options in the
AutoAppend property, then do not need to call this method explicitly.
For more details see the
Auto Appending section at the description of the
DynamicResourceManager class.