08 2021 档案

摘要:参考: 李志. Learning hard C#学习笔记 (图灵原创) (p. 86). 人民邮电出版社. Kindle 版本. 1 static void TestOut(out int a) 2 { 3 a = 12; //out 修饰符如果不赋值 就会导致 编译器报错 4 Console.Wr 阅读全文
posted @ 2021-08-30 19:34 小小林林 阅读(78) 评论(0) 推荐(0) 编辑
摘要:参考: 李志. Learning hard C#学习笔记 (图灵原创) (p. 86). 人民邮电出版社. Kindle 版本. 阅读全文
posted @ 2021-08-30 19:28 小小林林 阅读(53) 评论(0) 推荐(0) 编辑
摘要:参考: 李志. Learning hard C#学习笔记 (图灵原创) (p. 86). 人民邮电出版社. Kindle 版本. 值 类型 通常 被 分配 到 线程 的 堆栈 上, 而 引用 类型 则 被 分配 到 托管 堆 上。 不同 的 分配 位置 导致 了 不同的 管理 机制, 值 类型 的 阅读全文
posted @ 2021-08-27 11:22 小小林林 阅读(58) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Reflection; 3 4 namespace ConsoleApp1 5 { 6 class Program 7 { 8 // 自定义委托 9 public delegate void TestHandler(string msg) 阅读全文
posted @ 2021-08-27 09:52 小小林林 阅读(106) 评论(0) 推荐(0) 编辑
摘要:C# 委托类似于C函数指针示例使用: 1 using System; 2 using System.Reflection; 3 4 namespace ConsoleApp7 5 { 6 class Program 7 { 8 delegate void PrintHello(); 9 10 sta 阅读全文
posted @ 2021-08-27 09:36 小小林林 阅读(84) 评论(0) 推荐(0) 编辑
摘要:参考:文档API生成神器SandCastle使用心得 - edisoner - 博客园 (cnblogs.com) 下载 :SHFBInstaller_v2021.4.9.0 阅读全文
posted @ 2021-08-24 16:37 小小林林 阅读(45) 评论(0) 推荐(0) 编辑
摘要:测试线程同步机制 AutoResetEvent: 1 static AutoResetEvent wakeup = new AutoResetEvent(false); 2 static void pthread_func() 3 { 4 while (true) 5 { 6 7 Console.W 阅读全文
posted @ 2021-08-18 11:17 小小林林 阅读(35) 评论(0) 推荐(0) 编辑
摘要:今天测试程序发现一个比较有意思的事,如下代码: static void Main(string[] args) { List<byte> ts = new List<byte>() { 0x00, 0x01}; int aa = (int)ts[0] << 8 + (int)ts[1]; int b 阅读全文
posted @ 2021-08-17 10:08 小小林林 阅读(57) 评论(0) 推荐(0) 编辑
摘要:今天测试程序发现一个比较有意思的事,如下代码: static void Main(string[] args) { List<byte> ts = new List<byte>() { 0x00, 0x01}; int aa = (int)ts[0] << 8 + (int)ts[1]; int b 阅读全文
posted @ 2021-08-17 10:08 小小林林 阅读(209) 评论(2) 推荐(0) 编辑
摘要:在类定义中导入如下声明语句,可以直接在类方法中使用该函数。 [DllImport("kernel32")] extern static UInt64 GetTickCount64(); 阅读全文
posted @ 2021-08-12 18:45 小小林林 阅读(57) 评论(0) 推荐(0) 编辑
摘要:参考官方连接: Deserialize a Dictionary (newtonsoft.com) 步骤1:vs 项目安装对应包 步骤2: 添加using 引用 using Newtonsoft.Json; 完整程序 程序代码: 1 using System; 2 using System.Coll 阅读全文
posted @ 2021-08-10 13:22 小小林林 阅读(392) 评论(0) 推荐(0) 编辑
摘要:每个页面之前(如下) 不能够创建新class 否则会导致 VS 设计器不能正常显示 public partial class XXXForm : Form 阅读全文
posted @ 2021-08-09 14:06 小小林林 阅读(2042) 评论(0) 推荐(0) 编辑
摘要:图片资源有两个地方,一个是全局的在Properties下的Resources.resx文件,另一个是在专属于某窗体使用的图片资源,位置在窗体下的resx文件中。 从工具箱中拖入pictureBox 到设计窗口,然后在设计窗口右击选择图像继续导入到指定的图像到本窗口资源文件就行。 阅读全文
posted @ 2021-08-05 15:35 小小林林 阅读(927) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示