Extensions..::..ToIntSafely Method

Try to parse the string to an integer, returning 0 rather than an error if it can't be parsed

Namespace:  AngbandOS.Core
Assembly:  AngbandOS.Core (in AngbandOS.Core.dll)

Syntax


public static int ToIntSafely(
	this string s
)

Parameters

s
Type: String
The string to parse

Return Value

The int value of the string, or 0 if it couldn't be parsed