Posts

queue in C#

Image
  For Example: Write a program to demonstrate the use of queue. using System; using System.Collections; using System.Linq; using System.Text;   namespace ConsoleApplication12 {     class Program     {         static void Main(string[] args)         {             Queue q = new Queue();               q.Enqueue('A');             q.Enqueue('R');             q.Enqueue('Y');             q.Enqueue('A');               Console.WriteLine("Current queue: ");          ...

stack in C#

Image
  For Example: Write a program to demonstrate the use of stack. using System; using System.Collections; using System.Linq; using System.Text;   namespace ConsoleApplication11 {     class Program     {         static void Main(string[] args)         {             Stack st = new Stack();               st.Push('A');             st.Push('R');             st.Push('Y');             st.Push('A');               Console.WriteLine("Current stack: ");           ...

Hash Table in C# progrmming

Image
  For Example: Write a program using Hash Table with windows form. (First Create button and then set Name properties as button1_Click_Click) 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 form {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }           private void button1_Click_Click(object sender, EventArgs e)         {             Hashtable weeks = new Hashtable();  ...