I have this
The class foo can be designed, but is not the first class in the file
error after adding foo class derived from TextBox
You must have more than one classes in your file. Move your class up in the file so that it can be the first class in that file
Visual Studio requires class that was responsible for creation of file to be on top or first class of that file