コード例 #1
0
 /// <summary>
 /// 转换为十六机制
 /// </summary>
 /// <param name="bin">二进制</param>
 /// <example>in: 101110; out: 2E</example>
 public static string ToHexadecimal(string bin) => DecimalismConverter.ToHexadecimal(ToDecimalism(bin));
コード例 #2
0
 /// <summary>
 /// 转换为二进制字符串
 /// </summary>
 /// <param name="byte">byte</param>
 /// <example>in: (byte)128; out: 10000000</example>
 public static string ToBinary(byte @byte) => DecimalismConverter.ToBinary(@byte);
コード例 #3
0
 /// <summary>
 /// 转换为二进制字符串
 /// </summary>
 /// <param name="hex">十六进制字符串</param>
 /// <example>in: 2E; out: 101110</example>
 public static string ToBinary(string hex) => DecimalismConverter.ToBinary(ToDecimalism(hex));