P. 1
Application Foundation Lab 1 - Data Type

Application Foundation Lab 1 - Data Type

|Views: 0|Likes:
Published by M. Maaz Khan

More info:

Published by: M. Maaz Khan on Mar 07, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/07/2012

pdf

text

original

LAB 1: Data Types PART NO. 1 1. Go to Start > All Programs > Microsoft Visual Studio > Microsoft Visual Studio 2008 2.

Click File | New Project | C# or VB Tab |Console Application 3. 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. 4. Name the Project “AUCProject1” 5. Open Solution Explorer, select code file 6. VB.Net Programmer jump to line 7 and C# Programmer jump to line 8 7. Write following code in Modulle.vb file: Sub Main() 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:" & Integer.MinValue) Console.WriteLine("Signed Integer maximum:" & Integer.MaxValue) Console.WriteLine("Unsigned Integer minimum:" & UInteger.MinValue) Console.WriteLine("Unsigned Integer maximum:" & UInteger.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() End Sub

8. Write following code in Program.cs static void 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(); } 9. Following will be output:

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->