摘要: 一,动态代理编程 public class Proxy<T> : RealProxy where T : class { MarshalByRefObject myMarshalByRefObject; public Proxy(MarshalByRefObject realT) : base(ty 阅读全文
posted @ 2021-05-06 13:48 辣根弟弟 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 如下是当程序异常的时候,写Dump文件 public static class MiniDump { [DllImport("dbghelp.dll", EntryPoint = "MiniDumpWriteDump", CallingConvention = CallingConvention.S 阅读全文
posted @ 2021-04-27 14:56 辣根弟弟 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 一:控制台应用程序 通过为当前AppDomain添加 UnhandledException 事件处理程序。 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExcept 阅读全文
posted @ 2021-04-27 14:16 辣根弟弟 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 一,For<TLocal>(Int32 fromInclusive, Int32 toExclusive, Func<TLocal> localInit, Func<Int32, ParallelLoopState, TLocal, TLocal> body, Action<TLocal> loca 阅读全文
posted @ 2021-04-21 09:46 辣根弟弟 阅读(161) 评论(0) 推荐(0) 编辑
摘要: customErrors Asp.Net级别的错误处理程序,只处理Asp.Net应用抛出的异常(404,403,500。。) 在IIS7+的服务器依然可用(IIS7之前就引进了) 静态文件(如.jpg,.htm,.js等)不会被处理 放在System.Web节点 httpErrors IIS级别的错 阅读全文
posted @ 2018-11-10 14:52 辣根弟弟 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 了解ASP.NET MVC几种ActionResult的本质:EmptyResult & ContentResult 了解ASP.NET MVC几种ActionResult的本质:FileResult 了解ASP.NET MVC几种ActionResult的本质:JavaScriptResult & 阅读全文
posted @ 2018-10-30 20:37 辣根弟弟 阅读(190) 评论(0) 推荐(0) 编辑
摘要: C#中集合分类 阅读全文
posted @ 2018-09-26 21:57 辣根弟弟 阅读(161) 评论(0) 推荐(0) 编辑
摘要: All():判断所有元素是否都满足条件,若有一个不满足就返回false,否则返回true,源代码如下,如果方法里参数均为null,则会抛出异常。若该对象为null也会抛出异常,若该IEnumbe类型里元素个数为0,则会一直返回true public static bool All(this IEnumerable source, Func predicate) { i... 阅读全文
posted @ 2018-09-21 21:11 辣根弟弟 阅读(689) 评论(0) 推荐(0) 编辑
摘要: C#反射 创建对象实例 C#创建对象实例共有三种方法 (1)通过System.Reflection.Assmbly里方法获得实例,主要根据类的Fullname和构造函数的参数创建实例,包括了私有和公有的,很强大 (2)采用System.Activator里静态方法CreateInstance获得对应 阅读全文
posted @ 2018-09-02 17:06 辣根弟弟 阅读(3011) 评论(0) 推荐(0) 编辑
摘要: C#AssmblyInfo分析 这里就不再继续写了,就直接引用一些好的文章: 博客入口 阅读全文
posted @ 2018-09-02 10:42 辣根弟弟 阅读(176) 评论(0) 推荐(0) 编辑