C# Class Aqueduct.Utils.BaseConverter

Convert between bases
Mostra file Open project: aqueduct/Aqueduct.SitecoreLib Class Usage Examples

Public Methods

Method Description
FromBase10 ( ulong number, ushort toBase ) : string

Converts a number from base 10 to any base between 2 and 36.

ToBase ( string numberAsString, ushort fromBase, ushort toBase ) : string

Converts a number from any base between 2 and 36 to any base between 2 and 36.

ToBase10 ( string encodedNumber, ushort fromBase ) : ulong

Converts a number from any base between 2 and 36 to base 10.

Method Details

FromBase10() public static method

Converts a number from base 10 to any base between 2 and 36.
public static FromBase10 ( ulong number, ushort toBase ) : string
number ulong The number to be converted.
toBase ushort The base to which to convert. Has to be between 2 and 36.
return string

ToBase() public static method

Converts a number from any base between 2 and 36 to any base between 2 and 36.
public static ToBase ( string numberAsString, ushort fromBase, ushort toBase ) : string
numberAsString string The number to be converted.
fromBase ushort The base from which to convert. Has to be between 2 and 36.
toBase ushort The base to which to convert. Has to be between 2 and 36.
return string

ToBase10() public static method

Converts a number from any base between 2 and 36 to base 10.
public static ToBase10 ( string encodedNumber, ushort fromBase ) : ulong
encodedNumber string The number to be converted.
fromBase ushort The base from which to convert. Has to be between 2 and 36.
return ulong