if i include console.writeline() , then am not getting the last values in those 3 methods... clarify...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace Array_List
{
class Program
{
static void Main(string[] args)
{
Program pg = new Program();
pg.HashTable();
Console.WriteLine();
pg.Dictionary();
Console.WriteLine();
pg.table();
Console.ReadLine();
}
public void HashTable()
{
Hashtable h = new Hashtable();
h.Add(1, "Sunday");
h.Add(2, "Monday");
h.Add(3, "tuesday");
h.Add(4, "Wednesday");
h.Add(5, "Thursday");
h.Add(6, "Friday");
h.Add(7, "Saturday");
for (int j = 1; j < h.Count; j++)
{
Console.WriteLine(h[j]);
}
Console.WriteLine();
}
public void Dictionary()
{
Dictionary<int,> dict = new Dictionary<int,>();
dict.Add(1, "Jan");
dict.Add(2, "Feb");
dict.Add(3, "Mar");
dict.Add(4, "Apr");
dict.Add(5, "May");
dict.Add(6, "June");
dict.Add(7, "July");
dict.Add(8, "Aug");
dict.Add(9, "Sept");
dict.Add(10, "Oct");
dict.Add(11, "Nov");
dict.Add(12, "Dec");
for (int k = 1; k < dict.Count; k++)
{
Console.WriteLine(dict[k]);
}
Console.WriteLine();
}
public void table()
{
ArrayList names = new ArrayList();
names.Add("ARUL");
names.Add("POO");
names.Add("KAYAL");
names.Add("MOM");
names.Add("DAD");
for (int i = 0; i < names.Count; i++)
{
Console.WriteLine(names[i]);
}
}
}
}