Convert class


using System;
using System.Text;
using System.Globalization;
class Sample
{
    public static void Main()
    {
        double d = 3.9;
        int i = Convert.ToInt32(d);
        Console.WriteLine(i);
    }
}

The output:


4
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.