2
Answers

How to check the given string is float-point in c# ?

zjut

zjut

20y
5.3k
1
I need to implement the method : round(String name, int index) The given string maybe the every type of float type, and the msdn given the regax is that : [ws][sign]integral-digits[.[fractional-digits]][e[sign]exponential-digits][ws] and the index is the location after "." in name. First, i should check the given name is a valid float-point, and then, to check the number in name in index locaion is > 0 or not? eg: round(123.45612, 2) is that the "5" is > 0 . I indeed need your help , appreciate very much.
Answers (2)