using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
static void Main(string[] args)
Rectangle r = new Rectangle(10, 20);
Console.WriteLine(r.area().ToString());
Console.ReadKey();
}
class Rectangle {
public double length;
public double width;
public Rectangle(double l,double w)
length = l;
width = w;
public double area()
return length * width;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Rectangle r = new Rectangle(10, 20);
Console.WriteLine(r.area().ToString());
Console.ReadKey();
}
class Rectangle {
public double length;
public double width;
public Rectangle(double l,double w)
{
length = l;
width = w;
}
public double area()
{
return length * width;
}
}
}
}