Convert

Overview

Utility class to convert to/from Strings.

Location

 

constructor  protected

 

constructor

 

Convert()

 

init()

 

Convert()

 

Sub New()

Equals  virtual    (declared in Object)

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

HexStringToUInt64

Converts a hexadecimal string (Without any prefix) to an uint64.

 

class method HexStringToUInt64(s: String): UInt64

 

static UInt64 HexStringToUInt64(String s)

 

static func HexStringToUInt64(_ s: String) -> UInt64

 

static UInt64 HexStringToUInt64(String s)

 

Shared Function HexStringToUInt64(s As String) As UInt64

Parameters:

  • s: The string to convert.

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

ToBoolean

Converts an object to boolean, or throws on failure.

 

class method ToBoolean(o: Object): Boolean

 

static Boolean ToBoolean(Object o)

 

static func ToBoolean(_ o: Object) -> Boolean

 

static Boolean ToBoolean(Object o)

 

Shared Function ToBoolean(o As Object) As Boolean

Parameters:

  • o:

ToByte

Converts an object to Byte, or throws on failure.

 

class method ToByte(o: Object): Byte

 

static Byte ToByte(Object o)

 

static func ToByte(_ o: Object) -> Byte

 

static Byte ToByte(Object o)

 

Shared Function ToByte(o As Object) As Byte

Parameters:

  • o:

ToDouble

Converts an object to Double, or throws on failure.

 

class method ToDouble(o: Object): Double

 

static Double ToDouble(Object o)

 

static func ToDouble(_ o: Object) -> Double

 

static Double ToDouble(Object o)

 

Shared Function ToDouble(o As Object) As Double

Parameters:

  • o:

ToInt16

Converts an object to Int16, or throws on failure.

 

class method ToInt16(o: Object): Int16

 

static Int16 ToInt16(Object o)

 

static func ToInt16(_ o: Object) -> Int16

 

static Int16 ToInt16(Object o)

 

Shared Function ToInt16(o As Object) As Int16

Parameters:

  • o:

ToInt32

Converts an object to Int32, or throws on failure.

 

class method ToInt32(o: Object): Int32

 

static Int32 ToInt32(Object o)

 

static func ToInt32(_ o: Object) -> Int32

 

static Int32 ToInt32(Object o)

 

Shared Function ToInt32(o As Object) As Int32

Parameters:

  • o:

ToInt64

Converts an object to Int64, or throws on failure.

 

class method ToInt64(o: Object): Int64

 

static Int64 ToInt64(Object o)

 

static func ToInt64(_ o: Object) -> Int64

 

static Int64 ToInt64(Object o)

 

Shared Function ToInt64(o As Object) As Int64

Parameters:

  • o:

ToSByte

Converts an object to sbyte, or throws on failure.

 

class method ToSByte(o: Object): SByte

 

static SByte ToSByte(Object o)

 

static func ToSByte(_ o: Object) -> SByte

 

static SByte ToSByte(Object o)

 

Shared Function ToSByte(o As Object) As SByte

Parameters:

  • o:

ToSingle

Converts an object to single, or throws on failure.

 

class method ToSingle(o: Object): Single

 

static Single ToSingle(Object o)

 

static func ToSingle(_ o: Object) -> Single

 

static Single ToSingle(Object o)

 

Shared Function ToSingle(o As Object) As Single

Parameters:

  • o:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToUInt16

Converts an object to uint16, or throws on failure.

 

class method ToUInt16(o: Object): UInt16

 

static UInt16 ToUInt16(Object o)

 

static func ToUInt16(_ o: Object) -> UInt16

 

static UInt16 ToUInt16(Object o)

 

Shared Function ToUInt16(o As Object) As UInt16

Parameters:

  • o:

ToUInt32

Converts an object to uint32, or throws on failure.

 

class method ToUInt32(o: Object): UInt32

 

static UInt32 ToUInt32(Object o)

 

static func ToUInt32(_ o: Object) -> UInt32

 

static UInt32 ToUInt32(Object o)

 

Shared Function ToUInt32(o As Object) As UInt32

Parameters:

  • o:

ToUInt64

Converts an object to uint64, or throws on failure.

 

class method ToUInt64(o: Object): UInt64

 

static UInt64 ToUInt64(Object o)

 

static func ToUInt64(_ o: Object) -> UInt64

 

static UInt64 ToUInt64(Object o)

 

Shared Function ToUInt64(o As Object) As UInt64

Parameters:

  • o:

TryHexStringToUInt64

Converts a hex string to an uint64.

 

class method TryHexStringToUInt64(s: String; out Value: UInt64): Boolean

 

static Boolean TryHexStringToUInt64(String s, out UInt64 Value)

 

static func TryHexStringToUInt64(_ s: String, _ Value: UInt64) -> Boolean

 

static Boolean TryHexStringToUInt64(String s, __out UInt64 Value)

 

Shared Function TryHexStringToUInt64(s As String, <OutAttribute> ByRef Value As UInt64) As Boolean

Parameters:

  • s:
  • Value:

TryParseDouble (String, Locale, Double, Boolean): Boolean

Tries to parse a string as a double, returns false on failure.

 

class method TryParseDouble(s: String; aLocale: Locale; out Value: Double; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseDouble(String s, Locale aLocale, out Double Value, Boolean aRaiseOverflowException)

 

static func TryParseDouble(_ s: String, _ aLocale: Locale, _ Value: Double, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseDouble(String s, Locale aLocale, __out Double Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseDouble(s As String, aLocale As Locale, <OutAttribute> ByRef Value As Double, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s:
  • aLocale:
  • Value:
  • aRaiseOverflowException:

TryParseDouble (String, Double, Boolean): Boolean

Tries to parse a string as a double, returns false on failure.

 

class method TryParseDouble(s: String; out Value: Double; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseDouble(String s, out Double Value, Boolean aRaiseOverflowException)

 

static func TryParseDouble(_ s: String, _ Value: Double, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseDouble(String s, __out Double Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseDouble(s As String, <OutAttribute> ByRef Value As Double, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s:
  • Value:
  • aRaiseOverflowException:

TryParseInt64

try parsing a string to int64.

 

class method TryParseInt64(s: String; out Value: Int64; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseInt64(String s, out Int64 Value, Boolean aRaiseOverflowException)

 

static func TryParseInt64(_ s: String, _ Value: Int64, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseInt64(String s, __out Int64 Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseInt64(s As String, <OutAttribute> ByRef Value As Int64, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s: The string to convert.
  • Value: output value.
  • aRaiseOverflowException: If true, throws if the value is larger than fits int64.

TryParseUInt64

try parsing a string to uint64.

 

class method TryParseUInt64(s: String; out Value: UInt64; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseUInt64(String s, out UInt64 Value, Boolean aRaiseOverflowException)

 

static func TryParseUInt64(_ s: String, _ Value: UInt64, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseUInt64(String s, __out UInt64 Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseUInt64(s As String, <OutAttribute> ByRef Value As UInt64, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s: The string to convert.
  • Value: output value.
  • aRaiseOverflowException: If true, throws if the value is larger than fits uint64.

UInt64ToHexString

Converts a uint64 to hex with at least aDigits nr of digits.

 

class method UInt64ToHexString(v: UInt64; aDigits: Int32): String

 

static String UInt64ToHexString(UInt64 v, Int32 aDigits)

 

static func UInt64ToHexString(_ v: UInt64, _ aDigits: Int32) -> String

 

static String UInt64ToHexString(UInt64 v, Int32 aDigits)

 

Shared Function UInt64ToHexString(v As UInt64, aDigits As Int32) As String

Parameters:

  • v: The number to convert.
  • aDigits: The number of digits to at least emit.

 

HexStringToUInt64

Converts a hexadecimal string (Without any prefix) to an uint64.

 

class method HexStringToUInt64(s: String): UInt64

 

static UInt64 HexStringToUInt64(String s)

 

static func HexStringToUInt64(_ s: String) -> UInt64

 

static UInt64 HexStringToUInt64(String s)

 

Shared Function HexStringToUInt64(s As String) As UInt64

Parameters:

  • s: The string to convert.

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

ToBoolean

Converts an object to boolean, or throws on failure.

 

class method ToBoolean(o: Object): Boolean

 

static Boolean ToBoolean(Object o)

 

static func ToBoolean(_ o: Object) -> Boolean

 

static Boolean ToBoolean(Object o)

 

Shared Function ToBoolean(o As Object) As Boolean

Parameters:

  • o:

ToByte

Converts an object to Byte, or throws on failure.

 

class method ToByte(o: Object): Byte

 

static Byte ToByte(Object o)

 

static func ToByte(_ o: Object) -> Byte

 

static Byte ToByte(Object o)

 

Shared Function ToByte(o As Object) As Byte

Parameters:

  • o:

ToDouble

Converts an object to Double, or throws on failure.

 

class method ToDouble(o: Object): Double

 

static Double ToDouble(Object o)

 

static func ToDouble(_ o: Object) -> Double

 

static Double ToDouble(Object o)

 

Shared Function ToDouble(o As Object) As Double

Parameters:

  • o:

ToInt16

Converts an object to Int16, or throws on failure.

 

class method ToInt16(o: Object): Int16

 

static Int16 ToInt16(Object o)

 

static func ToInt16(_ o: Object) -> Int16

 

static Int16 ToInt16(Object o)

 

Shared Function ToInt16(o As Object) As Int16

Parameters:

  • o:

ToInt32

Converts an object to Int32, or throws on failure.

 

class method ToInt32(o: Object): Int32

 

static Int32 ToInt32(Object o)

 

static func ToInt32(_ o: Object) -> Int32

 

static Int32 ToInt32(Object o)

 

Shared Function ToInt32(o As Object) As Int32

Parameters:

  • o:

ToInt64

Converts an object to Int64, or throws on failure.

 

class method ToInt64(o: Object): Int64

 

static Int64 ToInt64(Object o)

 

static func ToInt64(_ o: Object) -> Int64

 

static Int64 ToInt64(Object o)

 

Shared Function ToInt64(o As Object) As Int64

Parameters:

  • o:

ToSByte

Converts an object to sbyte, or throws on failure.

 

class method ToSByte(o: Object): SByte

 

static SByte ToSByte(Object o)

 

static func ToSByte(_ o: Object) -> SByte

 

static SByte ToSByte(Object o)

 

Shared Function ToSByte(o As Object) As SByte

Parameters:

  • o:

ToSingle

Converts an object to single, or throws on failure.

 

class method ToSingle(o: Object): Single

 

static Single ToSingle(Object o)

 

static func ToSingle(_ o: Object) -> Single

 

static Single ToSingle(Object o)

 

Shared Function ToSingle(o As Object) As Single

Parameters:

  • o:

ToUInt16

Converts an object to uint16, or throws on failure.

 

class method ToUInt16(o: Object): UInt16

 

static UInt16 ToUInt16(Object o)

 

static func ToUInt16(_ o: Object) -> UInt16

 

static UInt16 ToUInt16(Object o)

 

Shared Function ToUInt16(o As Object) As UInt16

Parameters:

  • o:

ToUInt32

Converts an object to uint32, or throws on failure.

 

class method ToUInt32(o: Object): UInt32

 

static UInt32 ToUInt32(Object o)

 

static func ToUInt32(_ o: Object) -> UInt32

 

static UInt32 ToUInt32(Object o)

 

Shared Function ToUInt32(o As Object) As UInt32

Parameters:

  • o:

ToUInt64

Converts an object to uint64, or throws on failure.

 

class method ToUInt64(o: Object): UInt64

 

static UInt64 ToUInt64(Object o)

 

static func ToUInt64(_ o: Object) -> UInt64

 

static UInt64 ToUInt64(Object o)

 

Shared Function ToUInt64(o As Object) As UInt64

Parameters:

  • o:

TryHexStringToUInt64

Converts a hex string to an uint64.

 

class method TryHexStringToUInt64(s: String; out Value: UInt64): Boolean

 

static Boolean TryHexStringToUInt64(String s, out UInt64 Value)

 

static func TryHexStringToUInt64(_ s: String, _ Value: UInt64) -> Boolean

 

static Boolean TryHexStringToUInt64(String s, __out UInt64 Value)

 

Shared Function TryHexStringToUInt64(s As String, <OutAttribute> ByRef Value As UInt64) As Boolean

Parameters:

  • s:
  • Value:

TryParseDouble (String, Locale, Double, Boolean): Boolean

Tries to parse a string as a double, returns false on failure.

 

class method TryParseDouble(s: String; aLocale: Locale; out Value: Double; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseDouble(String s, Locale aLocale, out Double Value, Boolean aRaiseOverflowException)

 

static func TryParseDouble(_ s: String, _ aLocale: Locale, _ Value: Double, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseDouble(String s, Locale aLocale, __out Double Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseDouble(s As String, aLocale As Locale, <OutAttribute> ByRef Value As Double, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s:
  • aLocale:
  • Value:
  • aRaiseOverflowException:

TryParseDouble (String, Double, Boolean): Boolean

Tries to parse a string as a double, returns false on failure.

 

class method TryParseDouble(s: String; out Value: Double; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseDouble(String s, out Double Value, Boolean aRaiseOverflowException)

 

static func TryParseDouble(_ s: String, _ Value: Double, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseDouble(String s, __out Double Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseDouble(s As String, <OutAttribute> ByRef Value As Double, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s:
  • Value:
  • aRaiseOverflowException:

TryParseInt64

try parsing a string to int64.

 

class method TryParseInt64(s: String; out Value: Int64; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseInt64(String s, out Int64 Value, Boolean aRaiseOverflowException)

 

static func TryParseInt64(_ s: String, _ Value: Int64, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseInt64(String s, __out Int64 Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseInt64(s As String, <OutAttribute> ByRef Value As Int64, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s: The string to convert.
  • Value: output value.
  • aRaiseOverflowException: If true, throws if the value is larger than fits int64.

TryParseUInt64

try parsing a string to uint64.

 

class method TryParseUInt64(s: String; out Value: UInt64; aRaiseOverflowException: Boolean): Boolean

 

static Boolean TryParseUInt64(String s, out UInt64 Value, Boolean aRaiseOverflowException)

 

static func TryParseUInt64(_ s: String, _ Value: UInt64, _ aRaiseOverflowException: Boolean) -> Boolean

 

static Boolean TryParseUInt64(String s, __out UInt64 Value, Boolean aRaiseOverflowException)

 

Shared Function TryParseUInt64(s As String, <OutAttribute> ByRef Value As UInt64, aRaiseOverflowException As Boolean) As Boolean

Parameters:

  • s: The string to convert.
  • Value: output value.
  • aRaiseOverflowException: If true, throws if the value is larger than fits uint64.

UInt64ToHexString

Converts a uint64 to hex with at least aDigits nr of digits.

 

class method UInt64ToHexString(v: UInt64; aDigits: Int32): String

 

static String UInt64ToHexString(UInt64 v, Int32 aDigits)

 

static func UInt64ToHexString(_ v: UInt64, _ aDigits: Int32) -> String

 

static String UInt64ToHexString(UInt64 v, Int32 aDigits)

 

Shared Function UInt64ToHexString(v As UInt64, aDigits As Int32) As String

Parameters:

  • v: The number to convert.
  • aDigits: The number of digits to at least emit.

 

constructor  protected

 

constructor

 

Convert()

 

init()

 

Convert()

 

Sub New()

Equals  virtual    (declared in Object)

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String