摘要:
(一)将汉字转化成全拼代码:1 private void button1_Click(object sender, EventArgs e)2 {3 this.textBox2.Text = Hz2Py.Convert(this.textBox1.Text);4 }View Code 汉字转拼音类: 1 /// 2 /// 汉字转拼音类 3 /// 4 public class Hz2Py 5 { 6 private static int[] pyValue = new int[] 7 ... 阅读全文
摘要:
1 private long fileLength; 2 3 private long downLength;//已经下载文件大小,外面想用就改成公共属性 4 5 private static bool stopDown; 6 7 public HttpDownLoad() 8 9 { 10 11 fileLength = 0; 12 13 downLength = 0; 14 15 stopDown = false; 16 17 // 18 19 // TODO: 在此处添加构造函数逻辑 20 21... 阅读全文
摘要:
C# codenamespace UDPServer{ class Program { static void Main(string[] args) { int recv; byte[] data = new byte[1024]; //构建TCP 服务器 //得到本机IP,设置TCP端口号 IPEndPoint ipep = new IPEndPoint(IPAddress.Any , 8001); Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram , ProtocolType.Udp); // 阅读全文