单字节10进制到16进制转换

来源:互联网 发布:新开淘宝店如何经营 编辑:程序博客网 时间:2024/05/09 19:33
//单字节10进制到16进制转换private static string tenValue2byte(int ten){    switch (ten)    {        case 0:        case 1:        case 2:        case 3:        case 4:        case 5:        case 6:        case 7:        case 8:        case 9:            return ten.ToString();        case 10:            return "A";        case 11:            return "B";        case 12:            return "C";        case 13:            return "D";        case 14:            return "E";        case 15:            return "F";        default:            return "";    }}

原创粉丝点击