## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# whats wrong

I did what the instructions told me to do and there's an error

Polygon.cs
```namespace Treehouse.CodeChallenges
{
class Polygon
{

public Polygon(int numSides)
{
NumSides = numSides;
numSides=4
}
class Square :  Polygon
{

public Square(int sideLength) : base Polygon(numSides)
{

SideLength=sideLength;
}

}

}

}
```

your use of {} is probably wrong (correct indenting would make this clearer). You've added a line of code to the Polygon constructor that you don't need (and omitted the ;), and I'm not sure you need the word 'Polygon' on the line with the Square constructor. I'd assume that if you use base, it knows to use polygon.

I think you have the signature of the `Square` class inside of the `Polygon` class.

it seemed to accept:

```namespace Treehouse.CodeChallenges
{
class Polygon
{

public Polygon(int numSides)
{
NumSides = numSides;
}
}

class Square : Polygon
{

public Square(int sideLength) : base(4)
{
SideLength = sideLength;
}
}
}
```

Yep, that looks good! Though, calling the base constructor for `Polygon` should take in the `sideLength`.

um, a single sidelength would only apply to shapes that have all equal sides. a single value would not be useful for a generic polygon.

Simon Coates, you're right! I jumped the gun on that. I should have double checked. Thanks for letting me know! :)

Yes, at the moment your Square class is inside the Polygon class. Polygon and Square should be two separate classes, although Square inherits from Polygon. Also, don't forget to add a semicolon at the end of the SideLength field. The initialization of numSides to 4 can be done like that:

```public Square(int sideLength) : base(4)
```