MeraForum Community.No 1 Pakistani Forum Community

MeraForum Community.No 1 Pakistani Forum Community (http://www.MeraForum.Com/index.php)
-   C# (http://www.MeraForum.Com/forumdisplay.php?f=218)
-   -   Class1: Find the Minimum & Maximum range of the datatypes using C# Program (http://www.MeraForum.Com/showthread.php?t=114380)

AYAZ 05-12-2014 03:47 AM

Class1: Find the Minimum & Maximum range of the datatypes using C# Program
 
PART NO. 1
  • Go to Start > All Programs > Microsoft Visual Studio > Microsoft Visual Studio 2010
  • Click File | New Project | C# or VB Tab |Console Application
  • From New Project Dialog Box select Console Application, set Location to File System and set appropriate location by clicking the Browse Button, set Language to your preferred programming Language.
  • Name the Project “Meraforum1
  • Open Solution Explorer, select code file
  • Write the code in Program.cs


Code:

    staticvoid Main(string[] args)
          {
  Console.WriteLine("Unsigned Byte minimum:" + byte.MinValue);
  Console.WriteLine("Unsigned Byte maximum:" + byte.MaxValue);
  Console.WriteLine("Signed Byte minimum:" + sbyte.MinValue);
  Console.WriteLine("Signed Byte maximum:" + sbyte.MaxValue);
  Console.WriteLine("Signed Short minimum:" + short.MinValue);
  Console.WriteLine("Signed Short maximum:" + short.MaxValue);
  Console.WriteLine("Unsigned Short minimum:" + ushort.MinValue);
  Console.WriteLine("Unsigned Short maximum:" + ushort.MaxValue);
  Console.WriteLine("Signed Integer minimum:" + int.MinValue);
  Console.WriteLine("Signed Integer maximum:" + int.MaxValue);
  Console.WriteLine("Unsigned Integer minimum:" + uint.MinValue);
  Console.WriteLine("Unsigned Integer maximum:" + uint.MaxValue);
  Console.WriteLine("Signed Long minimum:" + long.MinValue);
  Console.WriteLine("Signed Long maximum:" + long.MaxValue);
  Console.WriteLine("Unsigned Long minimum:" + ulong.MinValue);
  Console.WriteLine("Unsigned Long maximum:" + ulong.MaxValue);
  Console.WriteLine("Decimal minimum:" + decimal.MinValue);
  Console.WriteLine("Decimal maximum:" + decimal.MaxValue);
  Console.WriteLine("Double minimum:" + double.MinValue);
  Console.WriteLine("Double maximum:" + double.MaxValue);
  Console.ReadLine();
          }

 

 



All times are GMT +5. The time now is 10:25 AM.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.