convert this string into decimal

前端 未结 4 1586
抹茶落季
抹茶落季 2020-12-04 03:59

Sounds easy but when I tried to achieve i\'m stock about how is the formatter to make this conversion this are some examples of strings that i need to convert to decimal

4条回答
  •  渐次进展
    2020-12-04 04:33

    Why not just use Decimal.Parse

    decimal x = Decimal.Parse("00.24");
    Console.WriteLine(x);  // Prints: 00.24
    

提交回复
热议问题