not a expert but
- Elrakrez already explained above
- The name of the file really does not matter, but you should name it after the main class
- You would ideally separate it into 2 files but i think in this case it would be called rectangle.cs
also brackey got a good video tutorials if like those: