What is the output from the following code
using System; class MyClass { private double radius = 10; public double Radius => radius; public double Area => 3.14 * radius * radius; } class Program { static void Main(string[] args) { MyClass ob = new MyClass(); Console.WriteLine("Area of the circle is {0} sq. unit", ob.Area); Console.ReadLine(); } }
Area of the circle is 314 sq. unit
We have used expression-bodied properties.