NamedValueDictionary.TryGetValue Method

Note

This method is available only when developing for Windows.

Gets the value associated with the specified key.

Syntax

'Declaration
Public Function TryGetValue ( _
         key As String, _
         out value As T _
) As Boolean 
public bool TryGetValue (
         string key,
         out T value
)
public:
bool TryGetValue(
         String key,
         out T value
)

Parameters

  • key
    Type: String
    Identity of the key of the element whose value is to be retrieved.
  • value
    Type: T
    [OutAttribute] The current value of the element.

Return Value

Type: Boolean
true if the value is present; false otherwise.

Remarks

If the key was not found, value gets the appropriate default value for the type T. For example, 0 (zero) for integer types, false for Boolean types, and a null reference for reference types.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline

Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

See Also

Reference

NamedValueDictionary Generic Class
NamedValueDictionary Members
Microsoft.Xna.Framework.Content.Pipeline Namespace

Platforms

Windows 7, Windows Vista, Windows XP