What conventions are usually applied when naming Forms and controls?
What will be an ideal response?
Usually, you want to provide reasonable Name property values for all the controls you place on a Form. Although any identifier that starts with a letter is legal, note the following conventions:
* Start control names with a lowercase letter and use camel casing as appropriate.
* Start Form names with an uppercase letter and use camel casing as appropriate. A Form is a class and, by convention, C# class names start with an uppercase letter.
* Use the type of the object in the name. For example, use names such as okButton, firstValueTextBox, or ArithmeticForm.
* Professional programmers usually do not retain the default names for Forms and controls. An exception is sometimes made for Labels that never change. For example, if three labels provide directions or explanations to the user and are never altered during a program's execution, many programmers would approve of retaining their names as label1, label2, and label3.
Most often, you will want to name controls as soon as you add them to a Form. If you rename a control after you have created an event for it, the event code will generate errors. To fix this, you must refactor the code.
You might also like to view...
In a class definition, if the word Private appears before a field declaration, Private is known as a(n) __________.
a. access specifier b. mutator c. class specifier d. private specifier
A ____ attack is a simple attack in which ICMP Echo Request packets are sent to a victim, who continues to send packets in response, effectively choking available bandwidth.
A. ping flood B. teardrop C. session hijacking D. buffer overflow
When a file is inserted into an existing document, where is it inserted?
A) on a separate section in the document B) at the top of the document C) at the insertion point D) at the bottom of the document
To remove indented layers from the Timeline to make it less cluttered, you can click a folder's Hide arrow in the Timeline.
Answer the following statement true (T) or false (F)