Top Banner
7/3/22 1 ADVANCED C# (Contd..) & WINDOWS FORMS 9 th June 2010
14
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 9th june

6/8/2010 1

ADVANCED C#(Contd..) &

WINDOWS FORMS9th June 2010

Page 2: 9th june

6/8/2010 2

Exception Handling

Page 3: 9th june

6/8/2010 3

Collections

Collections are enumerable data structures that can be assessed using indexes or keys.

Definition :

Page 4: 9th june

6/8/2010 4

System.Collections namespace• IEnumerable• IEnumerator• ICollection• IList• IDictionary

Page 5: 9th june

6/8/2010 5

ICollection

• System.Collections.Stack• System.Collections.Queue• System.Collections.BitArray• System.Collections.Specialized.NameValueColl

ection

Page 6: 9th june

6/8/2010 6

ArrayList

Page 7: 9th june

6/8/2010 7

StringCollections

Page 8: 9th june

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.

Page 9: 9th june

6/8/2010 9

Queue• First-in-First Out (FIFO) Approach

Page 10: 9th june

6/8/2010 10

Hashtable

Page 11: 9th june

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.

Page 12: 9th june

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.

Page 13: 9th june

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; } }

Page 14: 9th june

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()); } }