btArray[i] = Convert.ToByte(strArray[i],16);
2016-07-26 17:26
232 查看
namespace ConsoleApplication7
{
class Program
{
static void Main(string[] args)
{
String str = "61 41";
String[] strArray = str.Split(' ');
byte[] btArray = new byte[strArray.Length];
for (int i = 0; i < strArray.Length;i++ )
{
btArray[i] = Convert.ToByte(strArray[i],16);
//Console.WriteLine(bt);
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
String str = "61 41";
String[] strArray = str.Split(' ');
byte[] btArray = new byte[strArray.Length];
for (int i = 0; i < strArray.Length;i++ )
{
btArray[i] = Convert.ToByte(strArray[i],16);
//Console.WriteLine(bt);
}
}
}
}
相关文章推荐
- No matching provisioning profiles found 真机测试问题
- markdown 的基本操作
- 点击标签变换背景色
- AngularJS 服务(Service)
- Java验证码生成库JCaptcha入门
- ScrollView代码设置约束
- java获取当前系统时间和某月某一天的日期时间
- UL1007 UL1015与AWG
- POJ-2632-Crashing Robots
- 单链表及相关操作
- 我的博客
- VS2005,VS2008,VS2010快捷键整理
- openjudge 1.7 20 :删除单词后缀
- POJ1060
- js获取URL中传来的参数
- PyGobject(二十二)布局容器之Frame
- 调用安卓手机相册和拍照,出现闪退,原因是创建的包名有问题。
- PHP高级程序员必学
- 【算法】二分查找——与答案进行比较的思维
- cocos2dx google升级libpng