ComponentResourceManager.ApplyResources Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Apply a resource's value to the corresponding property of the object.
Overloads
ApplyResources(Object, String) |
Applies a resource's value to the corresponding property of the object. |
ApplyResources(Object, String, CultureInfo) |
Applies a resource's value to the corresponding property of the object. |
ApplyResources(Object, String)
- Source:
- ComponentResourceManager.cs
- Source:
- ComponentResourceManager.cs
- Source:
- ComponentResourceManager.cs
- Source:
- ComponentResourceManager.cs
Applies a resource's value to the corresponding property of the object.
public:
void ApplyResources(System::Object ^ value, System::String ^ objectName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")]
public void ApplyResources(object value, string objectName);
public void ApplyResources(object value, string objectName);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")>]
member this.ApplyResources : obj * string -> unit
member this.ApplyResources : obj * string -> unit
Public Sub ApplyResources (value As Object, objectName As String)
Parameters
- Attributes
Exceptions
value
or objectName
is null
.
Remarks
This method examines all the resources for the current culture used in the development environment. It attempts to find a resource with a key in the format of objectName.propertyName
, where objectName
is passed in as a parameter and propertyName
is the name of a property. It will then apply that resource's value
to the corresponding property of the object. If there is no matching property, the resource will be ignored.
Applies to
ApplyResources(Object, String, CultureInfo)
- Source:
- ComponentResourceManager.cs
- Source:
- ComponentResourceManager.cs
- Source:
- ComponentResourceManager.cs
- Source:
- ComponentResourceManager.cs
Applies a resource's value to the corresponding property of the object.
public:
virtual void ApplyResources(System::Object ^ value, System::String ^ objectName, System::Globalization::CultureInfo ^ culture);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")]
public virtual void ApplyResources(object value, string objectName, System.Globalization.CultureInfo? culture);
public virtual void ApplyResources(object value, string objectName, System.Globalization.CultureInfo culture);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")>]
abstract member ApplyResources : obj * string * System.Globalization.CultureInfo -> unit
override this.ApplyResources : obj * string * System.Globalization.CultureInfo -> unit
abstract member ApplyResources : obj * string * System.Globalization.CultureInfo -> unit
override this.ApplyResources : obj * string * System.Globalization.CultureInfo -> unit
Public Overridable Sub ApplyResources (value As Object, objectName As String, culture As CultureInfo)
Parameters
- culture
- CultureInfo
The culture for which to apply resources.
- Attributes
Exceptions
value
or objectName
is null
.
Remarks
This method examines all the resources for the provided culture. If culture
is null
, the current culture is assumed.
The ApplyResources method attempts to find a resource with a key in the format of objectName.propertyName
, where objectName
is passed in as a parameter and propertyName
is the name of a property. It will then apply that resource's value
to the corresponding property of the object. If there is no matching property, the resource will be ignored.