using System.Collections;
public static void Main()
object countObject = count;
count = (int)countObject;
var boxedInts = GetListWithBoxedInts();
var boxedInt = boxedInts[1];
var unBoxedInt = (int)boxedInt;
Console.WriteLine(unBoxedInt);
public static ArrayList GetListWithBoxedInts()
object boxedInteger = integer;
var arrayList = new ArrayList();
arrayList.Add(boxedInteger);
arrayList.Add(boxedInteger);
arrayList.Add(boxedInteger);
arrayList.Add(boxedInteger);