截取%分方式

string   strInput   =   "0.3575%";  
  float   f   =   float.Parse(strInput.Substring(0   ,strInput.Length   -   1));  
  f   /=   100;  

 

 

Decimal   d   =   Decimal.Parse("0.3575%".Substring(0   ,strInput.Length   -   1))/100;  

 

string   strInput   =   "0.3575%";  
  Decimal   f   =   Decimal.Parse(strInput.Replace("%",""))/100;  


 

posted on 2009-07-18 11:52  轻狂如我,奋华图强  阅读(654)  评论(0)    收藏  举报