Thursday, December 11, 2008

CONSTANTS

1 Declaring a Constant
The format to declare a constant is

Const Constant Name As Data Type = Value

Example:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Const Pi As Single=3.142

Const Temp As Single=37

Const Score As Single=100

End Sub

No comments:

Post a Comment