How to convert double into Integer?

Posted by Poster under C# category on | Views : 12806
To convert double into Integer, we can use following code snippet.

       string s = "1234501.23"; // any double value and make it as string by using ToString() like doubleValue.ToString();
double d = 0;
double.TryParse(s, out d);
int v = Convert.ToInt32(d);


Comments or Responses

Login to post response