VB .Net Data Type

(A) Numeric Data Types
Data Type Memory Size (Bytes) Empty/Default Value Value Range

Short

2

 0 (Small Integer)

Integer

4

0 (Medium Integer)

Long

8

 0 (Long Integer)

Single

4

 0.0 (Small Float )

Double

8

0.0 (Medium Float)

Decimal

16

0.0 (Long Float)

(B) Character and String Data Type
Data Type Memory Size (Bytes) Empty/Default Value Value Range

Char

2

stores only single character enclosed between double quotation mark.

String

Up to 2 billion characters

stores textual information as letters, digit and some special characters/combination of all these and  enclosed between double quotation mark.


(C) Byte Data Type

Data Type Memory Occupied (Bytes) Default Value Value Range

Byte

1

0 ( Byte data type is used to store binary data such as binary file, image, sound etc… It is unsigned Byte data type)

SByte

1

0 (stores binary data such as binary file, image, sound etc…It is signed Byte data type. )


(D) Boolean Data Type

Data Type Memory Occupied (Bytes) Default Value Value Range

Boolean

2 (stores true or false value.  we can also assign integer value to Boolean variable. Any Non-Zero value is considered as TRUE and zero is considered as FALSE.)

FALSE

stores true or false value.  we can also assign integer value to Boolean variable. Any Non-Zero value is considered as TRUE and zero is considered as FALSE.


(E) Date Data Type

Data Type Memory Occupied (Bytes) Default Value Value Range

Date

8

Date datatype is used to store Date and Time value.
You can assign values to Date variable using one of the following methods:
CurrentDate = Now.Date          ‘assign current system date
CurrentDate = #08/03/1982#    ‘assign user specific date


(F) Object Data Type

DataType Memory Occupied (Bytes) Default Values Value Ranges

Object

8

It is the default type of the variable. It means if you don’t declare the variable then the default Data Type for that variable is object.

stores value of any data type.

       

The Regular Expression Pattern Meaning

The regular expression pattern ^(?(")(".+?(?<!\\)"@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`{}|~\w])*)(?<=[0-9a-z])@))(?([)([(\d{1,3}.){3}\d{1,3}])|(([0-9a-z][-0-9a-z]*[0-9a-z]*.)+[a-z0-9][-a-z0-9]{0,22}[a-z0-9]))$ is interpreted as shown in the following table. 

Pattern Description
^ Begin the match at the start of the string.
(?(") Determine whether the first character is a quotation mark. (?(") is the beginning of an alternation construct.
(?("")("".+?(?<!\\)""@) If the first character is a quotation mark, match a beginning quotation mark followed by at least one occurrence of any character, followed by an ending quotation mark. The ending quotation mark must not be preceded by a backslash character (\). (?<! is the beginning of a zero-width negative lookbehind assertion. The string should conclude with an at sign (@).
|(([0-9a-z] If the first character is not a quotation mark, match any alphabetic character from a to z or A to Z (the comparison is case insensitive), or any numeric character from 0 to 9.
(\.(?!\.)) If the next character is a period, match it. If it is not a period, look ahead to the next character and continue the match. (?!\.) is a zero-width negative lookahead assertion that prevents two consecutive periods from appearing in the local part of an email address.
|[-!#$%&'*+/=?^`{}|~\w] If the next character is not a period, match any word character or one of the following characters: -!#$%’*+=?^`{}|~.
((.(?!.))|[-!#$%'*+/=?^`{}|~\w])* Match the alternation pattern (a period followed by a non-period, or one of a number of characters) zero or more times.
@ Match the @ character.
(?<=[0-9a-z]) Continue the match if the character that precedes the @ character is A through Z, a through z, or 0 through 9. The (?<=[0-9a-z]) construct defines a zero-width positive lookbehind assertion.
(?(\[) Check whether the character that follows @ is an opening bracket.
(\[(\d{1,3}\.){3}\d{1,3}\]) If it is an opening bracket, match the opening bracket followed by an IP address (four sets of one to three digits, with each set separated by a period) and a closing bracket.
|(([0-9a-z][-0-9a-z][0-9a-z].)+ If the character that follows @ is not an opening bracket, match one alphanumeric character with a value of A-Z, a-z, or 0-9, followed by zero or more occurrences of a hyphen, followed by zero or one alphanumeric character with a value of A-Z, a-z, or 0-9, followed by a period. This pattern can be repeated one or more times, and must be followed by the top-level domain name.
[a-z0-9][\-a-z0-9]{0,22}[a-z0-9])) The top-level domain name must begin and end with an alphanumeric character (a-z, A-Z, and 0-9). It can also include from zero to 22 ASCII characters that are either alphanumeric or hyphens.
$ End the match at the end of the string.

 724 total views,  1 views today

Categories: Visual Basic

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.