namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
//create the arraylist named days
ArrayList days = new ArrayList();
//add the elements in the arraylist
var a = days.Add("Sunday");
var b = days.Add("Monday");
var c = a | b; //perform or operation between a and b index values
var d = a & b; //perform add opeartion between a and b index values
var e = a ^ b; //perform Xor operation
days.Add("Tuesday");
days.Add("Wednesday");
days.Add("Thusday");
days.Add("Friday");
days.Add("Saturday");
Console.WriteLine("The hashcode of varaible a is:" + a.GetHashCode());
Console.WriteLine("The hashcode of varaible b is:" + b.GetHashCode());
Console.WriteLine("The hashcode of varaible c is:" + c.GetHashCode());
Console.WriteLine("The hashcode of varaible d is:" + d.GetHashCode());
Console.WriteLine("The hashcode of varaible e is:" + d.GetHashCode());
}
}
}
|