Nexus.Client.Games.Steam.KeyValue.AsInteger C# (CSharp) Method

AsInteger() public method

Attempts to convert and return the value of this instance as an integer. If the conversion is invalid, the default value is returned.
public AsInteger ( int defaultValue ) : int
defaultValue int The default value to return if the conversion is invalid.
return int
		public int AsInteger(int defaultValue)
		{
			int value;

			if (int.TryParse(Value, out value) == false)
			{
				return defaultValue;
			}

			return value;
		}