Pages

Friday, 5 July 2013

VB 11 Tutorial 3: Getting Started

VB 11 Tutorial 3: Getting Started

If you have not yet learnt about Strings Please refer to Tutorial 2: Here

Today we will be working with Numeric and different types of Numeric values.




Types of Numeric Values {Short, Integer, Long, Double, Decimal, Single} these Numeric values are Signed Numbers, so basically what that means is that these values can go negative.

Numeric Values that can not go negative {UInteger, ULong, UShort} these numeric values can not have a negative sign.

Code:

' Example in using Numeric Values.

Module SubNew

Sub Main()
Dim x As Integer = 0 ' you can declare items with values
Dim y As Integer = -1

Console.WriteLine(y + x) ' Console will output -1

End Sub


End Sub

No comments:

Post a Comment