C# 클래스 Aqueduct.Utils.BaseConverter

Convert between bases
파일 보기 프로젝트 열기: aqueduct/Aqueduct.SitecoreLib 1 사용 예제들

공개 메소드들

메소드 설명
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