随笔分类 -  程序开发 / .NET

摘要:转载自 https://tyrrrz.me/blog/expression-trees ‥/Working with Expression Trees in C#February 17, 202036 min read❤️ Thank You for Supporting Ukraine!As Ru 阅读全文
posted @ 2025-10-21 22:07 dewxin 阅读(10) 评论(0) 推荐(0)
摘要:简介 在Unity Editor开发过程中,我们会经常使用反射调用一些unity还没开放的接口,比如s_LastControlID, 但每个程序集都写一边反射不免显得有些麻烦。 本篇文章将介绍注入InternalsVisibleToAttribute注解到unity dll的方法,来帮助大家更便捷地 阅读全文
posted @ 2025-01-19 16:01 dewxin 阅读(143) 评论(0) 推荐(1)
摘要:目录简介什么是元数据Metadata HeaderHeaps 和 TablesHeapsTablesTokens 和 Coded TokensRIDTokensCoded Tokens记录Table的数据大小信息最后参考文献 简介 上文提到CLR Runtime Header中包含metadata 阅读全文
posted @ 2024-12-25 16:31 dewxin 阅读(88) 评论(0) 推荐(0)
摘要:目录简介PE文件结构总览Dos HeaderDOS StubNT HeadersSection HeadersSectionsDOS Header/StubNT HeadersSignatureFile HeaderOptional HeaderSection HeadersCLI Header ( 阅读全文
posted @ 2024-12-22 21:44 dewxin 阅读(107) 评论(0) 推荐(0)
摘要:目录简介公共语言运行时基础(Basics of the Common Language Runtime) 简介 本篇文章希望给读者提供一个关于中间语言(IL, intermediate language)的全局视野,给没接触过的同学补充一些基础知识。 公共语言运行时基础(Basics of the 阅读全文
posted @ 2024-12-22 21:22 dewxin 阅读(66) 评论(0) 推荐(0)
摘要:目录背景谁应该读本系列文章目录 背景 在服务端开发或者是客户端开发过程中,会大量应用C#语言,而C#语言又是基于.NET公共语言基础结构(Common Language Infrastructure)。C#编译器(legacy, Mono Compiler, Roslyn)将我们的源码转化为中间语言 阅读全文
posted @ 2024-12-22 18:30 dewxin 阅读(84) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/9271805/net-module-vs-assembly In .net the difference between an assembly and module is that a module does not con 阅读全文
posted @ 2024-11-27 21:13 dewxin 阅读(25) 评论(0) 推荐(0)
摘要:什么是枚举 the action of mentioning a number of things one by one 枚举的意思就是一个接一个提及一系列事物。 其中,这些事物需要有名字,才能被提及。以及需要有唯一标识该事物的方法。 形式一:Enum类 官方的枚举类型是最常用的枚举。每个枚举会生成 阅读全文
posted @ 2024-11-05 16:24 dewxin 阅读(44) 评论(0) 推荐(0)
摘要:stackalloc 官方文档 https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/stackalloc A stackalloc expression allocates a block of m 阅读全文
posted @ 2024-06-08 20:54 dewxin 阅读(555) 评论(0) 推荐(0)
摘要:### 简介 想对单例进行统一的管理,在UnityEditor[进入playMode](https://docs.unity.cn/2019.4/Documentation/ScriptReference/EditorApplication-playModeStateChanged.html)的时候 阅读全文
posted @ 2023-09-05 15:03 dewxin 阅读(41) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/10196897/memorymappedfile-createoropen-throws-the-handle-is-invalid C# mutex的名字和 MemoryMappedFile名字不能一样。。 可能是底层用到了 阅读全文
posted @ 2023-07-12 16:33 dewxin 阅读(61) 评论(1) 推荐(1)
摘要:[内存映射文件(Memory-mapped files)](https://learn.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files)是一种很好的进程间通信方式,它暴露了底层的细节,具有很强的扩展性以及性能。 ![](https 阅读全文
posted @ 2023-07-10 22:10 dewxin 阅读(604) 评论(0) 推荐(0)
摘要:### 问题展示以及源码 ![](https://img2023.cnblogs.com/blog/2243042/202307/2243042-20230707212750099-1036685882.gif) ```C# using System.Collections; using Syste 阅读全文
posted @ 2023-07-07 22:34 dewxin 阅读(67) 评论(0) 推荐(0)
摘要:### 起因 C#函数中没有显示native线程id的,只能显示managedThreadId,如果想显示nativeThreadId就需要通过[PInvoke](https://learn.microsoft.com/zh-cn/dotnet/standard/native-interop/pin 阅读全文
posted @ 2023-07-03 13:06 dewxin 阅读(54) 评论(0) 推荐(0)
摘要:https://github.com/dotnet/sdk/issues/16975 >6bee commented on Apr 1 > adding the following PropertyGroup to the .pubxml seems to have solved the issue 阅读全文
posted @ 2023-07-02 00:08 dewxin 阅读(162) 评论(0) 推荐(0)
摘要:```C# public static bool TryGetLocalEndPoint(out IPEndPoint ipEndPoint) { try { string localIP = string.Empty; using (Socket socket = new Socket(Addre 阅读全文
posted @ 2023-06-30 23:43 dewxin 阅读(117) 评论(0) 推荐(0)
摘要:转发自 https://www.cnblogs.com/walterlv/p/10236378.html `CommandLineParser` 是一款用于解析命令行参数的 NuGet 包。你只需要关注你的业务,而命令行解析只需要极少量的配置代码。 本文将介绍如何使用 `CommandLinePar 阅读全文
posted @ 2023-06-20 21:50 dewxin 阅读(443) 评论(0) 推荐(0)
摘要:### 问题 对于泛型类`List`,如果调用`type.FullName`和`type.Name`会分别返回下面的内容。 ```C# //type.FullName System.Collections.Generic.List`1[[System.Int32, mscorlib, Version 阅读全文
posted @ 2023-06-14 14:08 dewxin 阅读(514) 评论(0) 推荐(0)