ResXResourceManagerSetObject Method

Adds or replaces a resource object in the current ResXResourceManager with the specified name for the specified culture.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public void SetObject(
	string name,
	Object? value,
	CultureInfo? culture = null
)

Parameters

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.

Implements

IExpandoResourceManagerSetObject(String, Object, CultureInfo)

Remarks

If value is , a null reference will be explicitly stored. Its effect is similar to the RemoveObject method: 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.

Exceptions

See Also