How to validate a string in C#
TryParse is using for determine whether a string is a valid representation of a specified numeric type or not. TryParse method that is implemented by all primitive numeric types and also by types such as DateTime and IPAddress.
- param: The parameter string.
- result: The result will store in this variable.
- returns True or False.