Sdílet prostřednictvím


NamedValueDictionary.TryGetValue Method

Gets the value associated with the specified key.

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

Syntax

public bool TryGetValue (
         string key,
         out T value
)

Parameters

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

Return Value

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.

See Also

Reference

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

Platforms

Windows XP SP2, Windows Vista