doublie   TO   int 

   double d=5.0;
       int i = Convert.ToInt32(d);


decimal     TO  int 

 decimal d = 6.65M;
        int i = Convert.ToInt32(d);

 

string   TO  int  

        string s = "5.65";
        int i = Convert.ToInt32(double.Parse(s));

相关文章:

  • 2021-06-20
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2022-02-09
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案