C# Класс Aqueduct.Utils.BaseConverter

Convert between bases
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

FromBase10() публичный статический Метод

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.
Результат string

ToBase() публичный статический Метод

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.
Результат string

ToBase10() публичный статический Метод

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.
Результат ulong