How to check a given string is float-point in (c#) ?thanx

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: zjut (zjut_at_discussions.microsoft.com)
Date: 01/06/05


Date: Wed, 5 Jan 2005 19:27:01 -0800

I need to implement the method : round(String name, int index)

The given string maybe the every type of float type, ( 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 , can you give me some coder or some advice .
appreciate very much.



Relevant Pages

  • Re: How to byte swap an IEEE Float?
    ... It seems the OP already has the float type, 32-bit = 4-byte long, and the data are floats of this length, only different in byte order. ... fairly common task. ... better idea than handling it as a string. ... String because on your system a String happens to be a packed array of ...
    (comp.lang.ada)
  • Converting Integer / Float to String
    ... is there another way to convert a given String to an Integer or Float type? ... Alexander ...
    (comp.lang.ada)