AddThis Social Bookmark Button

Print

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

Array Class

Just as Visual Basic scalar data types are in fact CTS scalar data types, so Visual Basic arrays are actually members of the .NET System.Array class. Some of its members that are not readily available in Visual Basic .NET are shown in the following table:

Name

Member type

Description

BinarySearch

Shared method

Searches a one-dimensional array for a particular value

Clear

Shared method

Sets a range of array elements to zero, False, or a null reference, depending on the members' data type

Copy

Shared method

Copies a portion of one array to another and performs any necessary type conversions

CopyTo

Method

Copies all the elements of a one-dimensional array to another one-dimensional array starting at a particular index position

IndexOf

Shared method

Returns the index of the first occurrence of a particular value in an array

IsFixedSize

Property

Returns a Boolean indicating whether an Array object has a fixed size

IsReadOnly

Property

Returns a Boolean indicating whether the elements in Array object are read-only

LastIndexOf

Shared method

Returns the index of the last occurrence of a particular value in an array

Rank

Property

Returns an Integer indicating the number of dimensions of the array

Reverse

Shared method

Reverses the elements in all or part of a one-dimensional array

Sort

Shared method

Sorts a one-dimensional array


Boolean Structure

The following table lists the members of the System.Boolean structure that are not readily available in the Visual Basic .NET language:

Name

Member type

Description

FalseString

Shared field

Returns the string representation of the Boolean value False. This is a read-only constant value.

Parse

Shared method

Converts a string (whose value must be either Boolean.TrueString or Boolean.FalseString) to its Boolean equivalent.

TrueString

Shared field

Returns the string representation of the Boolean value True. This is a read-only constant value.


Byte Structure

The Visual Basic .NET Byte data type is synonymous with the .NET System.Byte data type. The following table lists some of the members of the Byte class that are not readily available in Visual Basic:

Name

Member type

Description

MaxValue

Shared field

A constant representing the largest possible value of an instance of the Byte class

MinValue

Shared field

A constant representing the smallest possible value of an instance of the Byte class

Parse

Shared method

Converts the numeric representation of a string to its Byte equivalent


Char Structure

Char, a new data type in VB.NET, corresponds to the System.Char data type. Some of the members of the latter that offer functionality not available in VB.NET are shown in the following table:

Name

Member type

Description

GetUnicodeCategory

Shared method

Returns a member of the UnicodeCategory enumeration (in the System.Globalization namespace) indicating the character type of a Char object.

IsControl

Shared method

Returns a Boolean indicating whether a particular Unicode character is a control character.

IsDigit

Shared method

Returns a Boolean indicating whether a particular Unicode character is a decimal digit. (The decimal and thousands separators are not considered digits.)

IsLetter

Shared method

Returns a Boolean indicating whether a particular Unicode character is a letter of the alphabet.

IsLetterOrDigit

Shared method

Returns a Boolean indicating whether a particular Unicode character is a digit or a letter of the alphabet.

IsLower

Shared method

Returns a Boolean indicating whether a particular Unicode character is a lowercase letter. The method returns True only for letters of the alphabet; that is, Char.IsLetter must also return True.

IsNumber

Shared method

Returns a Boolean indicating whether a particular Unicode character is a decimal or hexadecimal digit.

IsPunctuation

Shared method

Returns a Boolean indicating whether a particular Unicode character is a punctuation mark.

IsSeparator

Shared method

Returns a Boolean indicating whether a particular Unicode character is a separator character (e.g., a space). The method does not return True if the character is a numeric separator.

IsSymbol

Shared method

Returns a Boolean indicating whether a particular Unicode character is a symbol.

IsUpper

Shared method

Returns a Boolean indicating whether a particular Unicode character is an uppercase letter. The method returns True only for letters of the alphabet; that is, Char.IsLetter must also return True.

IsWhiteSpace

Shared method

Returns a Boolean indicating whether a particular Unicode character is white space.

MaxValue

Shared field

A constant containing the largest possible value of Char object.

MinValue

Shared field

A constant containing the smallest possible value of a Char object.

Parse

Shared method

Converts a particular character in a string to a Char object.


Pages: 1, 2, 3, 4

Next Pagearrow