[C#] 纯文本查看 复制代码 private Byte ShowWatchByLight(ref string ser2)
{
Byte ShowWatchId = 0x00; //
if (checkedListBox1.Items[0].ToString() == "0")
{
ShowWatchId = 0x00; //0
ser2 = "0";
}
if (checkedListBox1.Items[1].ToString() == "1")
{
ShowWatchId = 0x01; //数字1
ser2 = "1";
//查询所有选中项并拼接成一个字符串
if(checkedListBox1.CheckedItems.Count != 0)
{
for(int i = 0;i <= checkedListBox1.CheckedItems.Count-1 ; i++)
{
ser2 = ser2 + checkedListBox1.CheckedItems.ToString();
ShowWatchId += ShowWatchId; //能这样用吗?
}
===================================
Byte ShowWatchId = ShowWatchByLight(ref ser2); //调用并ref传值
Antanna2(0x01, ShowWatchId) 但是总是显示ShowWatchId错误。
急各位大神帮帮忙吧 |