上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 56 下一页
摘要: #define MY_DEBUG // 这个可以用中文 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; 阅读全文
posted @ 2023-02-02 16:43 double64 阅读(49) 评论(0) 推荐(0)
摘要: 这里在界面按钮事件下除 0 测试,感觉软件还是退出了? /// <summary> /// App.xaml 的交互逻辑 /// </summary> public partial class App : Application { protected override void OnStartup 阅读全文
posted @ 2023-01-30 22:28 double64 阅读(210) 评论(0) 推荐(0)
摘要: 这样的方式比用代码直接赋值有个好处,那就是能个实时的显示绑定效果。IDE 还可以提示和 F12 进行跳转定位。 XAML: <Window x:Class="MyWPFSimple5.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006 阅读全文
posted @ 2023-01-07 22:51 double64 阅读(569) 评论(0) 推荐(0)
摘要: ▲ 读写的文件 XiaoMing.json: {"Name":"小明","Sex":"男","Age":12} JsonWriteTest.json: { "StartX": 1.23, "StartY": 1.24, "EndX": 10, "EndY": "YY", "Favorites": [ 阅读全文
posted @ 2022-12-17 22:22 double64 阅读(251) 评论(0) 推荐(0)
摘要: 引用Newtonsoft.Json.dll using Newtonsoft.Json; 进行对象序列化和反序列化。 服务端: using System; using System.Collections.Generic; using System.Linq; using System.Net; u 阅读全文
posted @ 2022-12-17 21:42 double64 阅读(281) 评论(0) 推荐(0)
摘要: private short ReversalHighLowByte(short val) { byte[] arrSrc = BitConverter.GetBytes(val); byte[] arrDst = new byte[arrSrc.Length]; arrDst[0] = arrSrc 阅读全文
posted @ 2022-12-09 13:50 double64 阅读(598) 评论(0) 推荐(0)
摘要: public string GetLocalIPStr() { string localIP = string.Empty; using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0)) { s 阅读全文
posted @ 2022-12-09 13:34 double64 阅读(44) 评论(0) 推荐(0)
摘要: static void AddFileFix(string fileFullName, string prefix, string suffix) { try { if (string.IsNullOrEmpty(prefix) && string.IsNullOrEmpty(suffix)) { 阅读全文
posted @ 2022-12-09 13:30 double64 阅读(339) 评论(0) 推荐(0)
摘要: public class SerialNum { public SerialNum() { m_NumByteArr = new byte[4] { 48, 48, 48, 48 }; //m_NumByteArr = new byte[4] { 90, 90, 90, 90 }; ExcludeC 阅读全文
posted @ 2022-12-02 18:06 double64 阅读(285) 评论(0) 推荐(0)
摘要: BitConverter 类进行字节转换——MSDN byte[] dd = BitConverter.GetBytes(49490); // 转换出来的是:低位在前,高位在后,也就是 ABCD Console.WriteLine(BitConverter.ToInt32(dd, 0)); dd = 阅读全文
posted @ 2022-11-26 09:23 double64 阅读(2021) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 56 下一页