Const Variable for Constant : Const « Language Basics « VB.Net






Const Variable for Constant

Const Variable for Constant
Imports System

public class MainClass
    Shared Sub Main()
         Const FreezingPoint As Integer = 32 
         Const BoilingPoint As Integer = 212
         Console.WriteLine("Freezing point of water: {0}",FreezingPoint)
         Console.WriteLine("Boiling point of water: {0}", BoilingPoint)
    End Sub

End Class



           
       








Related examples in the same category

1.Const Variable in a FunctionConst Variable in a Function
2.String Const DemoString Const Demo
3.Define and use ConstDefine and use Const
4.Define and use Const valueDefine and use Const value