Share via


PropertyDictionary.SetValue Method (String, Int32)

Sets the value of the property with the specified key, as a System.Int32.

Namespace: Microsoft.Xna.Framework.GamerServices
Assembly: Microsoft.Xna.Framework.GamerServices (in microsoft.xna.framework.gamerservices.dll)

Syntax

public void SetValue (
         string key,
         int value
)

Parameters

  • key
    The key to search for in the PropertyDictionary.
  • value
    The value of the property to set for the specified key, as an Int32.

Remarks

If the value that corresponds to the specified key cannot be represented by an Int32, an InvalidCastException will be thrown. A KeyNotFoundException will be thrown if the key does not exist.

See Also

Reference

PropertyDictionary Class
PropertyDictionary Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7