using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lesson02
{
class Rectangle
{
private double length; //default access level
private double width;
public Rectangle(double l, double w)
{
length = l;
width = w;
}
public double GetArea()
{
return length * width;
}
}
}
class Program
{
static void Main(string[] args)
{
Rectangle rect = new Rectangle(10.0, 20.0);
double area = rect.GetArea();
Console.WriteLine("Area of Rectangle: {0}", area);
}
}
I am getting errors relating to the use of Rectangle Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'Rectangle' could not be found (are you missing a using directive or an assembly reference?) Lesson02 C:\Users\jbond\source\repos\Lesson02\Lesson02\Program.cs 29 Active
Can anyone please help? Many thanks.