C# C# Objects Inheritance Inheritance

I cannot figure out how to create a new .cs file here to make the sub class of the Polygon class.

I am trying to make the sub class called Square with the base class named Polygon. Polygon is already populated, however, I cannot find any place to make a new .cs file to create the sub class.

Polygon.cs
namespace Treehouse.CodeChallenges
{
    class Polygon
    {
        public readonly int NumSides;

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

2 Answers

Steven Parker
Steven Parker
177,671 Points

In actual practice, you might choose to place the classes in separate files, but it would also be a good strategy to group all the "Polygon" sub-classes together in the same file as the parent class.

For the challenge, you can create the new class in the same file, and within the same namespace.

Thank you, luckily I was able to figure this one out already, however, I do appreciate the feedback. Thank you!