Aaron

Aaron

  • NA
  • 52
  • 1.8k

build errors

Mar 17 2014 8:01 AM
Hi, 
 
When i run the code for my Rectangle application get an error for build error.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace My_Rectangle_application
{
class Program
{
static void Main(string[] args)
{
//member variables
double length;
double width;
public void Acceptdetails()
{
length = 4.5;
width = 4.5;
}
public double GetArea()
{
return length * width;
}
public void Display()
{
Console.WriteLine("Length: {0}", length);
Console.WriteLine("Width: {0}", width);
Console.WriteLine("Area: {0}", GetArea());
}
}
class ExecuteRectangle
{
static void Main(string[] args)
{
Rectangle r = new Rectangle();
r.Acceptdetails();
r.Display();
Console.ReadLine();
}
}
}
 Please help 
What should i do? 

Answers (2)