Changing the Name of a Form
The first thing you should do when you create a new object is to give it a descriptive name, so that's the first thing I'll talk about in this hour. Start Visual C# .NET 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 fclsFormsExample. When you need to create a new instance of this form, you'll use this name rather than the default generic name of Form1.
You may have noticed that the tabs in the designer refer to the name of the form file—not the name you give it in code. Change the filename of the form now by right-clicking Form1.cs in the Solutions Explorer, choosing Rename, and then changing the name of the form ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access