怎么不成功呀
using System;using System.Globalization;
public class ParseTest
{
public static void Main()
{
string s1="123456";
string s2="123456.78";
string s3="$123.23";
string s4="1.23456E+3";
Console.WriteLine(int.Parse(s1));
Console.WriteLine(double.Parse(s2));
Console.WriteLine(double.Parse(s3,NumberStyles.AllowCurrencySymbol|NumberStyles.Float));
Console.WriteLine(double.Parse(s4,NumberStyles.Float));
Console.WriteLine(double.Parse(s3,NumberStyles.Any));
Console.WriteLine(double.Parse(s4,NumberStyles.Any));
}
}