public string Name { get; set; }
public int Age { get; set; }
public Student(string name, int age, double gpa)
public double ShowGPA(string strType)
if (strType == "adjusted")
if (((Name.Length + Age.ToString().Length) % 4) == 0)
public static void Function(int i, ref double d)
Console.WriteLine("Entering CallFunction: i = {0}, d = {1}", i, d);
Console.WriteLine("Exiting CallFunction: i = {0}, d = {1}", i, d);
public static void Main()
Student mary = new Student(strName, iAge, dGPA);
Console.WriteLine(mary.ShowGPA("regular"));
Console.WriteLine(mary.ShowGPA("adjusted"));
Console.WriteLine(mary.LuckyDraw());
Console.WriteLine("=================");
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);
Function(iAge, ref dGPA);
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);