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

Convert a number (expressed as a string) from fromBase to toBase
public static Convert ( string number, int fromBase, int toBase ) : string
number string String representation of the number to be converted
fromBase int The current base of the number
toBase int The desired base to convert to
Результат string
Пример #1
0
 public static string FromInt64(long int64)
 {
     BaseConverter.CharList = _charList;
     return(BaseConverter.Convert(number: int64.ToString(CultureInfo.InvariantCulture), fromBase: 10, toBase: 36));
 }
Пример #2
0
 public static string FromInt32(int int32)
 {
     BaseConverter.CharList = _charList;
     return(BaseConverter.Convert(int32.ToString(CultureInfo.InvariantCulture), 10, 36));
 }
Пример #3
0
 public static string FromGuid(Guid guid)
 {
     BaseConverter.CharList = _charList;
     return(BaseConverter.Convert(guid.ToString("N"), 16, 36));
 }
Пример #4
0
 public static string FromHex(string hex)
 {
     BaseConverter.CharList = _charList;
     return(BaseConverter.Convert(hex.ToUpper(), 16, 36));
 }
Пример #5
0
 public static string FromGuid(Guid guid)
 {
     return(BaseConverter.Convert(guid.ToString("N"), 16, 36));
 }
Пример #6
0
 public static string FromHex(string hex)
 {
     return(BaseConverter.Convert(hex.ToUpper(), 16, 36));
 }