首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

这段delphi怎么转换为c#帮忙转换下

2012-01-18 
这段delphi如何转换为c#?帮忙转换下receive:integerbuffer:array[0..127]ofuchardata:array[0..127]ofuc

这段delphi如何转换为c#?帮忙转换下
receive:integer;
    buffer:array   [0..127]   of   uchar;
    data:array   [0..127]   of   uchar;
    s:string;
    i:integer;
    Card:uchar;

receive:=   Inventory(comhandle,strtoint( '$ '+setadd.Text),   $06,$00,$00,@data[0],@Card,@buffer[0]);

谢谢

[解决办法]


int receive;
byte[] buffer = new byte[128];
byte[] data = new byte[128];
string s;
int i;
byte Card = 0x00;
receive = Inventory(comhandle,int.Parse(setadd.Text,System.Globalization.NumberStyles.HexNumber),0x06,0x00,0x00,ref data[0],ref Card,ref buffer[0]);

热点排行