Runing Text

Do not Click

Data type in VB 2005

Sunday 23 August 2009 , Posted by Andi at 01:12

Type the value that can be accommodated by a variable is determined at the time of declaration of variables. Influential in the amount of memory allocated for the variable. Examples of data types in Vb.net:
Byte between 0-255
Short limit value -32,768 - 32,767
Integer limit value -2147483648 - 2147483647
Long accommodate integers
Single accommodate the real numbers
Double accommodate the real numbers
Accommodate decimal decimal
Boolean holds true or false value
Date accommodate the value of the date
Char accommodate one character
String holds more than characters

Type casting / Convert between data types
• Implicit conversion
- Done automatically.
- Occurs when converting from a smaller size to a larger size.
- Example:


Dim length as byte
Length1 as integer Dim
Length = 4
Length1 = length



• Explicit conversion
- Done by using the existing functions.
- Occurs when converting from the type of data that are not similar.
- Function: Cbool (), CDbl (), Cbyte (), Cchar (), Cdate () ...

Currently have 0 komentar:

Leave a Reply

Post a Comment

Related Post