C Sharp (C#) - Classes and Objects
What will be the output of the following code?
class Sample {
public int x = 5;
public void PrintX() {
int x = 10;
Console.WriteLine(this.x);
}
}
var obj = new Sample();
obj.PrintX();