ResourceLoader.GetString(String) Method

Definition

Returns the most appropriate string value of a resource, specified by resource identifier.

public:
 virtual Platform::String ^ GetString(Platform::String ^ resourceId) = GetString;
winrt::hstring GetString(winrt::hstring const& resourceId);
public string GetString(string resourceId);
function getString(resourceId)
Public Function GetString (resourceId As String) As String

Parameters

resourceId
String

Platform::String

winrt::hstring

The resource identifier of the resource to be resolved.

Note

The resource identifier is treated as a Uniform Resource Identifier (URI) fragment, subject to Uniform Resource Identifier (URI) semantics. For example, getString ("Caption%20") is treated as getString ("Caption "). Do not use "?" or "#" in resource identifiers, as they terminate the resource path. For example, "Foo?3" is treated as "Foo".

Returns

String

Platform::String

winrt::hstring

The most appropriate string value of the specified resource for the default ResourceContext.

Examples

See the example in ResourceLoader.

Applies to

See also