随笔分类 - C#反射
优化反射
摘要:https://linxinfa.blog.csdn.net/article/details/109187375 注意以下几点:1.需要引用的dll直接复制加入到自己的工程中,属性生成操作:嵌入的资源 2.正常添加dll的引用,设置复制本地属性给false; 3.注册AppDomain.Curren
阅读全文
摘要:中心思想一句话:当观察者注册在了一个生命周期长于自己的事件主题上,观察者不能被内存回收。 举例:写了一个小Demo来说明问题,Form1窗体用来验证输入的数字是否为质数(大于1只能被1或自身整除的数是质数),垃圾回收按钮是在调用GC清理内存,并显示当前能存中对象的数量; 定义事件参数类型NumEve
阅读全文
摘要:using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Reflection; using Syst
阅读全文
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Linq.Expressions; using System.Reflection; u
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 反射 { class AnObject { pu
阅读全文

浙公网安备 33010602011771号