using System;
public class Rectangle
{
private double length;
private double width;
public Rectangle(double l,double w)
length = l;
width = w;
}
public double GetArea()
return length * width;
public static void Main(String[] args)
Rectangle rect = new Rectangle(10.0, 20.0);
double area = rect.GetArea();
Console.WriteLine("area of rectangle is = {0}",area);
Console.ReadLine();