ResourceMap.HasKey | hasKey method

Applies to Windows and Windows Phone

Determines whether the map can retrieve a resource with the specified resource identifier.

Syntax


var boolean = resourceMap.hasKey(key);

Parameters

key

Type: String [JavaScript] | Platform::String [C++]

The resource identifier to locate in the map.

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

Return value

Type: Boolean [JavaScript] | Platform::Boolean [C++]

TRUE if the key is found, otherwise FALSE.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.ApplicationModel.Resources.Core
Windows::ApplicationModel::Resources::Core [C++]

Metadata

Windows.winmd

See also

ResourceMap

 

 

Show:
© 2014 Microsoft