随笔分类 - .NET Framework
Microsoft .NET Framework
摘要:案例 简单代码如下: string path = "ProcInstLog"; if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } string file = System.IO.
阅读全文
摘要:Appliaction Developer PowerShell for VS 2019 Command CD {Product Dir} msbuild -v:m -restore -t:Build -p:Configuration=Release -p:TargetFramework=net45
阅读全文
摘要:using (System.IO.MemoryStream ms = new System.IO.MemoryStream()) { using (System.IO.StreamWriter writer = new System.IO.StreamWriter(ms, Encoding.GetE
阅读全文
摘要:_is64Bit = Environment.Is64BitOperatingSystem; private object ReadRegistryKeyValue(string keyPath, string valueName) { object obj = null; using (var b
阅读全文
摘要:System.Security.Cryptography.RSACryptoServiceProvider cryptoServiceProvider = new System.Security.Cryptography.RSACryptoServiceProvider(4096); Console
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace Automatic_Mouse_Click { internal static class En
阅读全文
摘要:服务端 新建ASP.NET Core Web MVC 项目 SSOServer 2. NuGet安装IdentityServer4 3. 新建Config.cs类 public class Config { // scopes define the resources in your system
阅读全文
摘要:案例 通过Aspose.Html.Converters.Converter.ConvertMarkdown将markdown转换为html 出现中文乱码的情况 解决办法 可以在转换之前,将内存流中的字符串改为UTF-8即可. Stream stream = new MemoryStream(Enco
阅读全文
摘要:private void Main() { if (File.Exists(_svgFile)) { SetSvgSize(_svgFile, spnWidth.Value, spnHeight.Value); } } private void SetSvgSize(string file,deci
阅读全文
摘要:using System; using System.Text.RegularExpressions; public partial class RegexEx { /// <summary> /// 验证输入字符串是否与模式字符串匹配,匹配返回true /// </summary> /// <pa
阅读全文
摘要:$"[Id] NOT IN ('{string.Join("','", data.Details.Select(q => q.Id.ToString()))}')"
阅读全文
摘要:/// <summary> /// 不带[Serializable]标识的深度拷贝 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="obj"></param> /// <returns></returns> p
阅读全文
摘要:public class Test { private static Random _rd = new Random(); public Guid Id { get; set; } public string Name { get; set; } public bool Check { get; s
阅读全文
摘要:如果我们需要用gacutil去注册dll ,就需要使用Visual Studio的Command Prompt,前提是需要安装Visual Studio,但是客户端上一般是没有安装VS的,所以你就需要将gacutil的文件夹拷贝到部署的客户机上。在C盘搜索gacutil.exe,我们会搜索到三个文件
阅读全文
摘要:Use the registry information below to determine which version(s) and service pack level(s) of the Microsoft .NET Framework are installed.To do this, f
阅读全文
摘要:用SmartAssembly也很久了,之前用着也是一知半解地随意用用,从来没有深入研究过,到底能使用到哪种程度,心里也没有底。 今天索性再过一遍,记录下来,以供大家一起参考学习。也算是快乐助人。 逐个抠字不易,尊重版权,转载请注明出处,谢谢。 https://www.cnblogs.com/honk
阅读全文