
Cache Properties for Repeated References
If you have to reference a control’s property repeatedly, it’s better to assign the property to a temporary variable, then use that variable. This technique is called property caching. For example, if you need to assign text value in the Text1 textbox to all elements in an array named arr,