System Type Parse Method C# with Example



System Type Parse Method C# with Example

 using System;

namespace CSharpFundamentals
{
    class SystemTypeParseMethod
    {
        private static void Main(string[] args)
        {
			bool b = bool.Parse("TRUE");
			Console.WriteLine("Value of b: {0}", b);
			double d = double.Parse("990.8004");
			Console.WriteLine("Value of d: {0}", d);
			int i = int.Parse("6");
			Console.WriteLine("Value of i: {0}", i);
			char c = Char.Parse("x");
			Console.WriteLine("Value of c: {0}", c);        
		}
    }
}
 

0 Comment's

Comment Form

Submit Comment