转载(TCPClient 建立连接和断开连接函数)
摘要:public bool networkbuild()//建立端口连接 { if (client == null) { try { client = new TcpClient(networkip, networkport); netstream = client.GetStream(); retur
阅读全文
C# 多线程传递参数或多个参数
摘要:using System;using System.IO;using System.Text;using System.Threading; namespace ConsoleApp7{ class Program { static void Main(string[] args) { for (i
阅读全文
16进制字符串 用空格隔开
摘要:string Str = Regex.Replace(HexStr, @"(?<=[0-9A-F]{2})[0-9A-F]{2}", " $0");
阅读全文
Java & C# BCD编码与十进制转换
摘要:using System;using System.Collections.Generic;using System.Text; namespace Base{ public class BCDHelper { /// <summary> /// 用BCD码压缩数字字符串 /// </summary
阅读全文
C#串口数据收发数据
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u
阅读全文