Changing the Name of a Form

The first thing you should do when you create a new object is give it a descriptive name, so that's the first thing I'll talk about in this hour. Start C# now (if it's not already running) and create a new Windows Application titled Forms Example. Using the Properties window, change the name of the form to fclsExample. When you need to create a new instance of this form, you'll use this name rather than the default generic name of Form1.

Remember, when you change the name of the startup form for your application, you need to update the class name in the entry point of your application (static void Main()). Refer to ...

Get Sams Teach Yourself C#™ in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.