WindowsDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


AddThis Social Bookmark Button

An Introduction to the .NET FCL, Part 5
Pages: 1, 2, 3, 4

Int16 Structure

The VB.NET Short data type corresponds directly to the System.Int16 structure. The members of the latter structure that offer unique functionality are shown in the following table:

Name

Member type

Description

MaxValue

Shared field

A constant containing the largest possible value of an Int16 object

MinValue

Shared field

A constant containing the smallest possible value of an Int16 object

Parse

Shared method

Converts the string representation of a number to its Int16 equivalent


Int32 Structure

The VB.NET Integer data type corresponds directly to the System.Int32 structure. The members of the Int32 structure that offer unique functionality are shown in the following table:

Name

Member type

Description

MaxValue

Shared field

A constant containing the largest possible value of an Int32 object

MinValue

Shared field

A constant containing the smallest possible value of an Int32 object

Parse

Shared method

Converts the string representation of a number to its Int32 equivalent


Int64 Structure

The VB.NET Long data type corresponds directly to the System.Int64 structure. The members of the Int64 structure that offer unique functionality are shown in the following table:

Name

Member type

Description

MaxValue

Shared field

A constant containing the largest possible value of an Int64 object

MinValue

Shared field

A constant containing the smallest possible value of an Int64 object

Parse

Shared method

Converts the string representation of a number to its Int64 equivalent


Object Class

The VB.NET Object data type corresponds to the System.Object class. System.Object, however, offers no functionality that is not available through the standard Visual Basic language.



Single Structure

The VB.NET Single data type corresponds to the .NET Framework's System.Single data type. The following table lists the members of the latter that offer functionality not found in the Visual Basic .NET language:

Name

Member type

Description

Epsilon

Shared field

A constant containing the smallest positive Single value greater than zero

MaxValue

Shared field

A constant containing the largest possible value of a Single object

MinValue

Shared field

A constant containing the smallest possible value of a Single object

NaN

Shared field

A constant containing the representation of a value that is not a number (NaN)

NegativeInfinity

Shared field

A constant containing a number that represents negative infinity

PositiveInfinity

Shared field

A constant containing a number that represents positive infinity

IsInfinity

Shared method

Returns a Boolean indicating whether the value of a Single object represents positive or negative infinity

InNaN

Shared method

Returns a Boolean indicating whether a Single object contains a value that is not a number (NaN)

IsNegativeInfinity

Shared method

Returns a Boolean indicating whether the value of a Single object represents negative infinity

IsPositiveInfinity

Shared method

Returns a Boolean indicating whether the value of a Single object represents positive infinity

Parse

Shared method

Converts the string representation of a number to its Single equivalent


String Class

The VB.NET String data type is equivalent to the System.String class. The members of the String class that offer functionality not incorporated in the VB.NET language are shown in the following table:

Name

Member type

Description

Chars

Property

Returns a Char instance representing the character at a particular position in a string

Clone

Method

Returns an additional reference to a particular String instance

CompareOrdinal

Shared method

Compares two strings without considering locale settings

CopyTo

Method

Copies a designated number of characters starting at a particular position in a string to a character array

Empty

Shared field

A constant representing an empty string

EndsWith

Method

Returns a Boolean indicating whether the String instance ends with the substring passed to the method as an argument

Format

Shared method

Replaces each format specification in a string with its corresponding value

IndexOf

Method

Returns the position of the first occurrence of a character or a substring within the string instance

IndexOfAny

Method

Returns the index of the first occurrence in this String instance of any element in a character array

Insert

Method

Inserts a substring at a designated position of a String instance

LastIndexOf

Method

Returns the position of the last occurrence of a designated character or substring within the string instance

LastIndexOfAny

Method

Returns the position of the last occurrence in this String instance of any of a set of characters in a character array

PadLeft

Method

Right aligns the characters in a String instance by padding them with a space or another designated character

PadRight

Method

Left aligns the characters in a String instance by padding them with a space or another designated character

Remove

Method

Deletes a specified number of characters from a String instance beginning at a designated position

StartsWith

Method

Returns a Boolean indicating whether the String instance begins with a designated substring or character

ToCharArray

Method

Copies the characters in the String instance to a Unicode character array


Non-CTS Data Types

Note, however, that because they are not part of the Common Language Specification (the specification that defines the core functionality that a .NET platform must implement), VB does not wrap the following CTS data types:

System.SByte

Description: Signed byte

Value Range: -128 to 127

System.UInt16

Description: Unsigned 16-bit integer

Value Range: 0 to 65,535

System.UInt32

Description: Unsigned 32-bit integer

Value Range: 0 to 4,294,967,295

System.UInt64

Description: Unsigned 64-bit integer

Value Range: 0 to 18,446,744,073,709,551,615

Budi Kurniawan is a senior J2EE architect and author.

Ted Neward is an independent software development architect and mentor in the Sacramento, California area.


Return to .NET DevCenter.