文章分类 -  C# 基础

C#
摘要:加密 var url = $"https://www.jshaman.com:4430/submit_js_code/";//js混淆加密接口 var httpClient = _httpClientFactory.CreateClient(); var path = $"D:/js/pages/" 阅读全文
posted @ 2024-09-09 15:42 北极星下落不明 阅读(9) 评论(0) 推荐(0)
摘要:1.包引用可使用最新版本 <PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta15" /> <PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" /> 阅读全文
posted @ 2024-08-16 16:27 北极星下落不明 阅读(12) 评论(0) 推荐(0)
摘要:控制面板-管理工具-事件查看器 阅读全文
posted @ 2024-01-08 09:37 北极星下落不明 阅读(16) 评论(0) 推荐(0)
摘要:public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); var configuration = builder.Configuration; builder.Configur 阅读全文
posted @ 2024-01-02 12:50 北极星下落不明 阅读(17) 评论(0) 推荐(0)
摘要:1.定义特性类 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public class MQDtoAttribute:Attri 阅读全文
posted @ 2021-09-08 10:37 北极星下落不明 阅读(41) 评论(0) 推荐(0)
摘要:1.引用 <PackageReference Include="NPOI" Version="2.5.4" />,操作word。 引用<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" /> 操作M 阅读全文
posted @ 2021-09-02 16:24 北极星下落不明 阅读(541) 评论(0) 推荐(0)
摘要:Uri loginUrl = new Uri("http://192.211.146.69/test"); HttpClientHandler clientHandlerLogin = new HttpClientHandler(); clientHandlerLogin.ServerCertifi 阅读全文
posted @ 2021-08-03 14:29 北极星下落不明 阅读(1010) 评论(0) 推荐(0)
摘要://自启动RegistryKey r_loca1l = Registry.CurrentUser; RegistryKey r_run1 = r_loca1l.CreateSubKey(@"software\microsoft\windows\currentversion\run"); r_run1 阅读全文
posted @ 2021-07-28 18:50 北极星下落不明 阅读(384) 评论(0) 推荐(0)
摘要:下载包 <PackageReference Include="EPPlus" Version="5.6.0" /> 1、公用方法 public abstract class EpPlusExcelExporterBase : ITransientDependency { private readon 阅读全文
posted @ 2021-07-09 14:46 北极星下落不明 阅读(247) 评论(0) 推荐(0)
摘要:public static string GenerateMD5(string txt) { using (MD5 mi = MD5.Create()) { byte[] buffer = Encoding.Default.GetBytes(txt); //开始加密 byte[] newBuffer 阅读全文
posted @ 2021-07-09 14:25 北极星下落不明 阅读(46) 评论(0) 推荐(0)
摘要:protected void AddObjects<T>(ExcelWorksheet sheet, int startRowIndex, IList<T> items, params Func<T, object>[] propertySelectors) { if (items.IsNullOr 阅读全文
posted @ 2021-07-09 14:22 北极星下落不明 阅读(277) 评论(0) 推荐(0)
摘要:dataTable.Rows[i]["DRP"] == System.DBNull.Value 阅读全文
posted @ 2021-07-08 10:12 北极星下落不明 阅读(389) 评论(0) 推荐(0)
摘要:1.首先添加Microsoft.Extensions.Http和Microsoft.Extensions.DependencyInjection依赖项 2.如果请求地址是https,则加上System.Net.ServicePointManager.SecurityProtocol = Securi 阅读全文
posted @ 2021-07-08 10:03 北极星下落不明 阅读(912) 评论(0) 推荐(0)