Exemplo n.º 1
0
 /// <summary>
 /// Convert from binary to hexadecimal
 /// </summary>
 /// <example>in: 101110; out: 2E</example>
 /// <param name="bin"></param>
 /// <returns></returns>
 public static string ToHexadecimal(string bin)
 {
     return(DecimalismConversion.ToHexadecimal(ToDecimalism(bin)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Convert from hexadecimal to binary
 /// </summary>
 /// <example>in: 2E; out: 101110</example>
 /// <param name="hex"></param>
 /// <returns></returns>
 public static string ToBinary(string hex) => DecimalismConversion.ToBinary(ToDecimalism(hex));
Exemplo n.º 3
0
 /// <summary>
 /// Convert from <see cref="byte"/> to binary
 /// </summary>
 /// <example>in: (byte)128; out: 10000000</example>
 /// <param name="byte"></param>
 /// <returns></returns>
 public static string ToBinary(byte @byte)
 {
     return(DecimalismConversion.ToBinary(@byte));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Convert from hexadecimal to binary
 /// </summary>
 /// <example>in: 2E; out: 101110</example>
 /// <param name="hex"></param>
 /// <returns></returns>
 public static string ToBinary(string hex)
 {
     return(DecimalismConversion.ToBinary(ToDecimalism(hex)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Convert from binary to hexadecimal
 /// </summary>
 /// <example>in: 101110; out: 2E</example>
 /// <param name="bin"></param>
 /// <returns></returns>
 public static string ToHexadecimal(string bin) => DecimalismConversion.ToHexadecimal(ToDecimalism(bin));