Uredi

Deli z drugimi prek


Conversion Class

Definition

The Conversion module contains the procedures used to perform various conversion operations.

public ref class Conversion sealed
[Microsoft.VisualBasic.CompilerServices.StandardModule]
public sealed class Conversion
[<Microsoft.VisualBasic.CompilerServices.StandardModule>]
type Conversion = class
Public Module Conversion
Inheritance
Conversion
Attributes

Examples

This example uses the Hex function to return the hexadecimal value of a number.

Dim testHex As String
' Returns 5.
testHex = Hex(5)
' Returns A.
testHex = Hex(10)
' Returns 1CB.
testHex = Hex(459)

Remarks

This module supports the Visual Basic language keywords and run-time library members that convert decimal numbers to other bases, numbers to strings, strings to numbers, and one data type to another.

Methods

CTypeDynamic(Object, Type)

Converts an object to the specified type.

CTypeDynamic<TargetType>(Object)

Converts an object to the specified generic type.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
ErrorToString()

Returns the error message that corresponds to a given error number.

ErrorToString(Int32)

Returns the error message that corresponds to a given error number.

Fix(Decimal)

Returns the integer portion of a number.

Fix(Double)

Returns the integer portion of a number.

Fix(Int16)

Returns the integer portion of a number.

Fix(Int32)

Returns the integer portion of a number.

Fix(Int64)

Returns the integer portion of a number.

Fix(Object)

Returns the integer portion of a number.

Fix(Single)

Returns the integer portion of a number.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Hex(Byte)

Returns a string representing the hexadecimal value of a number.

Hex(Int16)

Returns a string representing the hexadecimal value of a number.

Hex(Int32)

Returns a string representing the hexadecimal value of a number.

Hex(Int64)

Returns a string representing the hexadecimal value of a number.

Hex(Object)

Returns a string representing the hexadecimal value of a number.

Hex(SByte)

Returns a string representing the hexadecimal value of a number.

Hex(UInt16)

Returns a string representing the hexadecimal value of a number.

Hex(UInt32)

Returns a string representing the hexadecimal value of a number.

Hex(UInt64)

Returns a string representing the hexadecimal value of a number.

Int(Decimal)

Returns the integer portion of a number.

Int(Double)

Returns the integer portion of a number.

Int(Int16)

Returns the integer portion of a number.

Int(Int32)

Returns the integer portion of a number.

Int(Int64)

Returns the integer portion of a number.

Int(Object)

Returns the integer portion of a number.

Int(Single)

Returns the integer portion of a number.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Oct(Byte)

Returns a string representing the octal value of a number.

Oct(Int16)

Returns a string representing the octal value of a number.

Oct(Int32)

Returns a string representing the octal value of a number.

Oct(Int64)

Returns a string representing the octal value of a number.

Oct(Object)

Returns a string representing the octal value of a number.

Oct(SByte)

Returns a string representing the octal value of a number.

Oct(UInt16)

Returns a string representing the octal value of a number.

Oct(UInt32)

Returns a string representing the octal value of a number.

Oct(UInt64)

Returns a string representing the octal value of a number.

Str(Object)

Returns a String representation of a number.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
Val(Char)

Returns the numbers contained in a string as a numeric value of appropriate type.

Val(Object)

Returns the numbers contained in a string as a numeric value of appropriate type.

Val(String)

Returns the numbers contained in a string as a numeric value of appropriate type.

Applies to

See also