# HG changeset patch # User IBBoard # Date 1233001803 0 # Node ID dfb7cb94c16937b3a3a5d4ce1030b4686da3bf7e # Parent 0352fa33ee8f2bc615571de81bb54b24da2f1b2a Add number parser class with static method for ints no-open-ticket diff -r 0352fa33ee8f -r dfb7cb94c169 CustomMath/NumberParser.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CustomMath/NumberParser.cs Mon Jan 26 20:30:03 2009 +0000 @@ -0,0 +1,18 @@ +// This file (NumberParser.cs) is a part of the IBBoard utils library and is copyright 2009 IBBoard. +// +// The file and the library/program it is in are licensed under the GNU LGPL license. Please see COPYING.LGPL for more information and the full license. + +using System; + +namespace IBBoard +{ + public class NumberParser + { + public static int ParseAsInt(string numberString, int defaultValue) + { + int parsedValue = defaultValue; + int.TryParse(numberString, out parsedValue); + return parsedValue; + } + } +} diff -r 0352fa33ee8f -r dfb7cb94c169 IBBoard.mdp --- a/IBBoard.mdp Sun Jan 25 15:04:31 2009 +0000 +++ b/IBBoard.mdp Mon Jan 26 20:30:03 2009 +0000 @@ -48,6 +48,7 @@ +