devxlogo

Use a Control’s Implicit Value “Default” Property

Use a Control’s Implicit Value “Default” Property

Every control has an implicit “value” property. For textboxes it is the Text property. For Labels it is Caption:

 lblZip.Caption = "Zip Code" 

You do not need to reference this property to set the value forthe control. This will execute 10 to 15 percent faster, but you will lose a littlereadability:

 lblZip = "Zip Code" 

devx-admin

Share the Post: