public struct codinate
{
public int x;
public int y;
}
codinate a;
a.x = 10;
a.y = 20;//如何将a这个结构体发送过去呢?
UdpClient udpsender = new UdpClient();
IPEndPoint ipend = new IPEndPoint(IPAddress.Parse("192.168.1.255"), 6000);
string message = "ok";
byte[] bytes = Encoding.ASCII.GetBytes(message);
udpsender.Send(bytes, bytes.Length, ipend);
udpsender.Close();
可以给出具体代码吗?