c#:字符串到整数转换?

aug*_*ine 1 c#

我有格式为Rs.2,5,000的字符串.现在我想将字符串值读取为250000并插入数据库(假设来自第三方的2,50,000卢比,如Web服务,wcf服务或其他应用程序).是否有任何直接的解决方案,不使用你 String.Replace()可以编写代码以删除逗号.

V4V*_*tta 8

这样的东西适合我

string numb="2,50,000";
int.TryParse(numb, NumberStyles.AllowThousands, CultureInfo.InvariantCulture.NumberFormat,out actualValue);
Run Code Online (Sandbox Code Playgroud)