9th june
TRANSCRIPT
6/8/2010 1
ADVANCED C#(Contd..) &
WINDOWS FORMS9th June 2010
6/8/2010 2
Exception Handling
6/8/2010 3
Collections
Collections are enumerable data structures that can be assessed using indexes or keys.
Definition :
6/8/2010 4
System.Collections namespace• IEnumerable• IEnumerator• ICollection• IList• IDictionary
6/8/2010 5
ICollection
• System.Collections.Stack• System.Collections.Queue• System.Collections.BitArray• System.Collections.Specialized.NameValueColl
ection
6/8/2010 6
ArrayList
6/8/2010 7
StringCollections
6/8/2010 8
Stack• The Stack class is one that provides a Last-in-First-out (LIFO)
collection of items of the System.Object type.
6/8/2010 9
Queue• First-in-First Out (FIFO) Approach
6/8/2010 10
Hashtable
6/8/2010 11
Windows FormWindows Forms is the name given to the graphical application programming interface (API) included as a part of Microsoft's.NET Framework, providing access to the native Microsoft Windows interface elements by wrapping the existing Windows API in managed code.
6/8/2010 12
Architecture of WinForms
A Windows Forms application is an event-driven application supported by Microsoft's .NET Framework. Unlike a batch program, it spends most of its time simply waiting for the user to do something, such as fill in a text box or click a button.
6/8/2010 13
Empty Formusing System;using System.Windows.Forms;
public class EmptyForm : System.Windows.Forms.Form{ public EmptyForm() { } public static int Main() { Application.Run(new EmptyForm()); return 0; } }
6/8/2010 14
My First Window
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; public class MyFirstWindow : System.Windows.Forms.Form { public MyFirstWindow() { InitializeComponent(); }
private void InitializeComponent() { this.Size = new System.Drawing.Size(300,300); this.Text = "MyFirstWindow"; } public static void Main(string[] args) { Application.Run(new MyFirstWindow()); } }