方法1 Concat函数这种方法很有用
var byte_正文长度字节=bit converter.getbytes (从IP地址. hosttonetworkorder ((int ) _msgSend_发送的信息. Length ); var byte_正文字节=encoding.utf8.getbytes (从_ msgsend _发送的信息); 要发送的字节=byte_正文长度字节. concat(byte_正文字节).ToArray ); 方法2 Array.Copy网上介绍的很多,使用起来很麻烦
byte[] bytes_要发送的字节1=new byte[byte_正文长度字节. Length byte_正文字节. Length] array.copy(byte_正文长度字节,0,bytes array.copy(byte_正文字节,0,bytes_待发送字节,byte_正文长度字节. Length,byte_正文字节. Length );