views:

47

answers:

2

i've a string like1.00E+4

Is there any built in function to convert this string to 10000.(Integer convertion [1.00E+4=10000]).?

Now i'm using regular expression for this kind of strings

+5  A: 

You can do:

double.Parse("1.00E+4", CultureInfo.InvariantCulture)
klausbyskov
Need we specify the `cultureInfo`. ?
Pramodh
Yes, you should always specify cultureinfo (formatprovider). The result varies depending on the formatprovider you use, so it's generally a good idea to always be specific about this so you don't get unexpected results when running on a machine with a different culture.
klausbyskov
@klausbyskov : Thanks for your kind information.....
Pramodh