namespace RectangleApplication {
class Rectangle {
//member variables
public double length;
public double width;
public double GetArea() {
return length * width;
}
public void display() {
Console.WriteLine(Length: {0}, length);
Console.WriteLine(Width: {0}, width);
Console.WriteLine(Area: {0}, GetArea());
}
}//end class Rectangle
class ExecuteRectangle {
static void Main(string[] args) {
Rectangle r = new Rectangle();
r.length = 4.5;
r.width = 3.5;
r.display();
Console.ReadLine();
}
}
}