Which TextBox property should always be changed first?
-
AcceptsReturn
-
BorderStyle
-
Font
-
Name
-
Text
Explanation: The correct answer is option D) Name.
When working with a TextBox in a Windows Forms application, it is important to set the Name property before any other property. This is because the Name property is used as the identifier for the control, and changing it later can cause errors in your application.
Once you have set the Name property, you can then move on to setting other properties such as Font, BorderStyle, AcceptsReturn, and Text.
So, it is recommended to set the Name property of the TextBox control first, before any other property.
Convention (and practicality) dictates renaming a control's Name property first, right after placing it on the form — every other property, and any code referencing the control, is tied to that name, so changing it later means re-touching all that code. Properties like Text, Font, or BorderStyle are cosmetic/behavioral and can safely be adjusted at any point afterward.