Gets the integer value of a string.
The integer value of a string.
The default value is returned if the string is blank, null or is not an integer. No exception is thrown if the string is not an integer.
int i0 = MainUtil.GetInt("12", 0); // 12
int i1 = MainUtil.GetInt("", 0); // 0
int i2 = MainUtil.GetInt(null, 0); // 0
int i3 = MainUtil.GetInt("123abc", 0); // 0
MainUtil Class | Sitecore Namespace | MainUtil.GetInt Overload List