using Masuit.Tools.Strings; using System; namespace Masuit.Tools { public static class LongExtensions { /// /// 十进制转任意进制 /// /// /// 进制 /// public static string ToBinary(this long num, byte newBase) { var nf = new NumberFormater(newBase); return nf.ToString(num); } /// /// 转换成字节数组 /// /// /// public static byte[] GetBytes(this long value) { return BitConverter.GetBytes(value); } } }