Blog

Output of following code:

class Program {
public struct Employee {
public int ID;
public string EName;
internal int ERegNumber;
private Single monthlySalary;
}

public static void EmployeeHandler(ref Employee x) {
x.ERegNumber = 8014;
Console.WriteLine(x.ERegNumber);
}

static void Main(string[] args) {
Employee e = new Employee();
e.ERegNumber = 7986;
EmployeeHandler(ref e);
Console.WriteLine(e.ERegNumber);
}
}