What is the output of the below given program?
public class Area
public readonly double PI = 3.14;
public class MainClass
public static void Main()
Area A = new Area();
A.PI = 3.15;
We will get compilation error, PI is readonly. You can only read the value of PI in the Main() method. You cannot assign any value to PI.
Back To Top