Skip to main content

Posts

Showing posts from July, 2013

Non Generic Collection:Queue

Queue:non generic collection An introduction to DOT NET: Non generic collection: Queue The non-generic collection classes store data of type Object. queue is FIFO first come first served . Here queue is used to save data and retrieved it in FIFO manner. You can run program and see the working procedure of it. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Collections; namespace queuecollectionprogram {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();             label1.Text = "" ;         }         Queue qq = new Queue ();         private void textBox1_TextChanged( object sender, EventArgs e)         {             label1.Text = "" ;         }         private vo

Nongeneric Collection:Stack By:Tanuj Kumar

stack:non generic collection The System.Collections namespace contains interfaces and classes that define Non generic collections, which allow users to  collections. An introduction to DOT NET: Non Generic collection: Stack Stackis LIFO Last in first out. Here stack is used to save data and retrieved it in LIFO manner. You can run program and see the working procedure of it. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Collections; namespace stackcollection {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         Stack st = new Stack ();         private void button1_Click( object sender, EventArgs e)         {             if (textBox1.Text == "" )            

Nongeneric Collection:Hash Table By:Tanuj Kumar

Hash table :Nongeniric collection using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Collections; namespace hashtableprogram {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         String s;         Hashtable ht = new Hashtable ();         private void button1_Click( object sender, EventArgs e)         {             ht.Add(textBox1.Text, textBox2.Text);             listBox1 .Items .Clear ();            foreach ( DictionaryEntry de in ht)             {                 listBox1.Items.Add(de.Key+ " " +de.Value );               }             MessageBox .Show( "saved" );         }         private void button2_Click( object sender, EventArgs