Naming Objects
The property you should always set first for any new object is the Name property. Press F4 to display the Properties window (if it's not already visible), and scroll down to the Design section to see the “(Name)” property. The default name is Form1. When you first create an object, Visual C# .NET gives the object a unique, generic name based on the object's type. Although these names are functional, they simply aren't descriptive enough for practical use. For instance, Visual C# .NET named your form Form1, but it's common to have dozens of forms in a project, and it would be extremely difficult to manage such a project if all forms were distinguishable only by a number (Form2, Form3, and so forth).
In actuality, what you're working ... |
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