June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Visual Basic allows you to create constants—members whose values cannot change during program execution. To create a constant instance variable of a class, declare that member as either Const or ReadOnly. An instance variable declared as Const must be initialized in its declaration; an instance variable declared as ReadOnly can be initialized either in its declaration or in the class constructor. Const values must be initialized at compile time; whereas ReadOnly values are not initialized until runtime. Neither a Const nor a ReadOnly value can be modified once initialized.
Error-Prevention Tip 9.4
|
| If a variable’s ... |
Read now
Unlock full access