Udp发送

string message = "0302";
byte[] sendbytes = Encoding.ASCII.GetBytes(message);
remoteIpep = new IPEndPoint(IPAddress.Parse(ip), 26); // 发送到的IP地址和端口号
sendUdpClient.Send(sendbytes, sendbytes.Length, remoteIpep);

原文地址:https://www.cnblogs.com/VictorBlog/p/5193187.html