public static void Main()
Console.WriteLine("Please enter the mark for test 1:");
iTest1 = int.Parse(Console.ReadLine());
Console.WriteLine("Please enter the mark for test 2:");
iTest2 = int.Parse(Console.ReadLine());
Calculate(iTest1, iTest2, ref iTotal, out iAvg);
Console.WriteLine("Total: {0} and Avg: {1}", iTotal, iAvg);
static void Calculate(int _iTest1, int _iTest2, ref int _iTotal, out int _Avg)
_iTotal = _iTest1 + _iTest2;