03 2025 档案
摘要:SetPixel和GetPixel private void btnC_Click(object sender, RoutedEventArgs e) { OpenFileDialog dia = new OpenFileDialog(); dia.Filter = "图像文件|*.png;*.bm
阅读全文
摘要:var buffer = new byte[1024]; using (var ms = new MemoryStream(buffer)) { //xxx } 原因是buffer的长度过短,当接受到的字节流长度大于1024时,读不完整。 修改为: int len = 1024 * 1024 * 1
阅读全文
摘要:private static System.Text.RegularExpressions.Regex regex = new Regex("([\u0000-\uffff])"); private static System.Text.RegularExpressions.Regex cRegex
阅读全文
摘要:private static void DealA(object sender, UnhandledExceptionEventArgs e) { Console.WriteLine($"Exception A Catches it!"); } private static void DealB(o
阅读全文
摘要:byte[] bytes = { 1,3 }; short s = BitConverter.ToInt16(bytes,0); Console.WriteLine(s); 从低位到高位填充: 0000 0003 0000 0001 3*2^8+1=769; byte[] bytes = { 0x2
阅读全文

浙公网安备 33010602011771号