随笔分类 - C#
.net framework most popular programming language..
摘要:Task.Factory.StartNew 内部开启子线程后的调度等待慢的问题。将同步阻塞改为不依赖环境上下文的方式: async/await Interestingly, the new await keyword can almost be thought of as a language eq
阅读全文
摘要:一、配置文件概述: 应用程序配置文件是标准的 XML 文件,XML 标记和属性是区分大小写的。它是可以按需要更改的,开发人员可以使用配置文件来更改设置,而不必重编译应用程序。配置文件的根节点是configuration。我们经常访问的是appSettings,它是由.Net预定义的配置节。我们经常使
阅读全文
摘要:一、直接使用cmd来进行服务的一些操作 1、安装服务 [javascript] view plain copy sc create test3 binPath= "C:\Users\Administrator\Desktop\win32srvDemo\win32srvdemo\Debug\win32
阅读全文
摘要:What is Garbage Collection and Why We Need It? When you create any object in C#, CLR (common language runtime) allocates memory for the object from he
阅读全文
摘要:ConcurrentDictionary的ContainsKey 保证了多线程读取、写入没问题,线程安全。但是并不能保证Key 重复 。这里多线程的时候,Key可能重复导致Add失败,请优先使用 AddOrUpdate 。 using System; using System.Collections
阅读全文
摘要:A few questions came up: 提出了一些问题: Does a base64 string always end with = ? base64字符串是否总是以=结尾吗? Why does an = get appended at the end? 为什么在末尾添加= ? It's
阅读全文
摘要:示范: using System.Windows; using System.Threading; using System.ComponentModel; namespace WpfApp1 { /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summa
阅读全文
摘要:官方文档地址:https://docs.aspose.com/display/wordsnet/Home 官方Demo代码:https://github.com/aspose-words/Aspose.Words-for-.NET 2、Word文件加水印代码 注意:除了引用Aspose.Words.
阅读全文
摘要:Aspose.Words无需Microsoft Word也可在任何平台上满足Word文档的一切操作需求。本文将与大家分享如何检测文件格式和检查格式兼容性。 有时我们需要在打开文件之前检测文档文件的格式,因为文件扩展名不能保证文件内容是合适的。 例如,大家都知道,Crystal Reports通常以R
阅读全文
摘要:【.NET】UnpackMe!Shielden+DNGuard,双层变异壳 - 脱壳详解 2018-04-09阅读 2.9K0 前言:自从脱壳神器de4dot横空出世以来,我们可以看到几乎所有的.net破文中的第一部分就是不管三七二十一把程序丢进去脱壳以及反混淆。可是你真的明白de4dot背后做了些
阅读全文
摘要:以下为在.net mvc中,生成pdf的几种方式,资料都是在做项目时网上找的 1、使用Microsoft.Office.Interop.Word.dll将word转换为PDF dll可以单独下载,一般在电脑中有,位置:C:\Windows\Microsoft.NET\Framework\v4.0.3
阅读全文
摘要:1 private void Font_IsStyleAvailable() 2 { 3 Graphics graphics = CreateGraphics(); 4 graphics.Clear(Color.White); 5 6 Pen pen = new Pen(Color.Gray); 7
阅读全文
摘要:1 protected void Page_Load(object sender, EventArgs e) 2 3 { 4 5 CultureInfo[] cinfo = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureType
阅读全文
摘要:原文链接:https://blog.csdn.net/dap769815768/java/article/details/105506072 应用程序如果运行期间崩溃了,大概率是来不及记录日志的,大部分情况下,进程并不会立即退出,而是弹出一个错误的弹窗。如果错误弹窗里面的信息有限,这个时候可以利用小
阅读全文
摘要:调用示范: https://gitee.com/henduanqiushui/ExcelFillColor 代码核心: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Te
阅读全文
摘要:#region 字段 常量 private const string PATTERN_TEMPLATE = "*.cmt"; /// <summary> /// 模板文件后缀名 /// </summary> private const string EXTEN_NAME_TEMPLATE = ".c
阅读全文
摘要:首先,先拖一个NotifyIcon到主窗体,然后设置NotifyIcon的图标,不然等下最小化后,都找不到那个程序了,还有那个Text也是,不写名字,就默认是NotifyIcon了..如下图: 然后双击NotifyIcon,代码如下: /// <summary> /// 添加双击托盘图标事件(双击显
阅读全文
摘要:在.NET Framework里面提供了三种Timer ① System.Windows.Forms.Timer ② System.Timers.Timer ③ System.Threading.Timer 一、System.Windows.Forms.Timer 1、基于Windows消息循环,用
阅读全文
摘要:DVT JetBrains License Server是JetBrains系列软件授权服务器,支持2017版本得jetbrains pycharm,JetBrainswebstorm,JetBrains CLion,JetBrains dotTrace,JetBrains ToolBox,JetB
阅读全文
摘要:没有 Autofac DryIoc Grace LightInject Lamar Stashbox Unity Ninject Autofac DryIoc Grace LightInject Lamar Stashbox Unity Ninject 的日子,才是好日子~~~~~~~~~~ Usi
阅读全文