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 == "regular")
else if (strType == "adjusted")
double MyGPA = _GPA * 1.15;
if (MyGPA >= 4) return 4;
int Sum = Name.Length + Age;
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 Person1 = new Student (strName, iAge, dGPA);
Console.WriteLine(Person1.ShowGPA("regular"));
Console.WriteLine(Person1.ShowGPA("adjusted"));
Console.WriteLine(Person1.LuckyDraw());
Console.WriteLine("=================");
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);
Function(iAge, ref dGPA);
Console.WriteLine("Age:{0}, GPA:{1}", iAge, dGPA);