Added TryParse method to convert string to int and double.