Let's go

随笔分类 -  C#篇章

摘要:1、.xlsx后缀模板 使用NPOI版本【v 2.7.0】 using NPOI.HSSF.UserModel;using NPOI.SS.UserModel;using NPOI.SS.Util;using NPOI.XSSF.UserModel; /// <summary> /// 模板初始化 阅读全文
posted @ 2024-06-18 10:13 chenze 阅读(18) 评论(0) 推荐(0) 编辑
摘要:数据库中字段类型对应C#中的数据类型: 数据库 C#程序 int int32 text string bigint int64 binary System.Byte[] bit Boolean char string datetime System.DateTime decimal System.D 阅读全文
posted @ 2023-07-25 16:06 chenze 阅读(372) 评论(0) 推荐(0) 编辑
摘要:1、正常,同时开启两个线程 //启动函数 public void Test() { Thread thread1 = new Thread(() => SC1()); thread1.Start(); Thread thread2 = new Thread(() => SC2()); thread2 阅读全文
posted @ 2022-08-20 09:31 chenze 阅读(27) 评论(0) 推荐(0) 编辑
摘要:1、委托 namespace ConsoleApp1 { class Program { public delegate void Del(string message); static void Main(string[] args) { Del hanld = new Del(DelegateM 阅读全文
posted @ 2022-07-13 12:27 chenze 阅读(25) 评论(0) 推荐(0) 编辑
摘要:一、关闭杀死当前进程 使用System.Environment.Exit(0)在开发电脑关闭正常,其他电脑运行有存在程序停止运行等问题,采用杀死进程的方法 private void Browser_FormClosed(object sender, FormClosedEventArgs e) { 阅读全文
posted @ 2022-03-23 17:34 chenze 阅读(27) 评论(0) 推荐(0) 编辑
摘要:案例一、 public static void Main() { // Create the token source. CancellationTokenSource cts = new CancellationTokenSource(); // Pass the token to the can 阅读全文
posted @ 2021-07-14 13:39 chenze 阅读(54) 评论(0) 推荐(0) 编辑
摘要:一、下载安装Microsoft.RdlcDesigner.vsix设计器。 下载链接:https://probitools.gallerycdn.vsassets.io/extensions/probitools/microsoftrdlcreportdesignerforvisualstudio- 阅读全文
posted @ 2021-04-23 09:47 chenze 阅读(3969) 评论(0) 推荐(1) 编辑
摘要:常用快捷键 Ctrl-M-O 折叠所有方法 Ctrl-M-P 展开所有方法并停止大纲显示(不可以再折叠了) Ctrl-M-M 折叠或展开当前方法 Ctrl-M-L 展开所有方法 Ctrl-K-S 代码块 阅读全文
posted @ 2021-01-23 10:17 chenze 阅读(70) 评论(0) 推荐(0) 编辑
摘要:一、C#WebService跨域问题 Web.config中system.web节点下添加 <webServices> <protocols> <add name="HttpGet"/> <add name="HttpPost"/> <add name="HttpSoap"/> <add name= 阅读全文
posted @ 2020-12-17 11:39 chenze 阅读(170) 评论(0) 推荐(0) 编辑
摘要:一、 简介:现实生活中,我们最常见的数为十进制数,比如交通信号灯上的数字,电子表上的时间等。 相关换算 2进制,用两个阿拉伯数字:0、1; 8进制,用八个阿拉伯数字:0、1、2、3、4、5、6、7; 10进制,用十个阿拉伯数字:0到9; 16进制,用十六个阿拉伯数字……等等,阿拉伯人或说是印度人,只 阅读全文
posted @ 2020-12-14 18:35 chenze 阅读(7215) 评论(0) 推荐(2) 编辑
摘要:一、原始方法 using System; using System.Configuration; using System.Data; using System.Data.SqlClient; namespace SaiAo.UI.Helper { public class SqlHelper { 阅读全文
posted @ 2020-11-26 22:48 chenze 阅读(276) 评论(0) 推荐(0) 编辑
摘要:一、 1.C#中值类型和引用类型分别包含哪些,分别列举一下 值类型:Sbyte, short, int, long, byte, ushort, char, ulong 引用类型包括:数组,用户定义的类、接口、委托,object,字符串 2.关键词ref和out的作用是什么?它们有什么区别? ref 阅读全文
posted @ 2020-11-04 15:48 chenze 阅读(165) 评论(0) 推荐(0) 编辑
摘要:一、 1.先创建一个System.xml的文件 <?xml version="1.0" encoding="utf-8" ?> <systems> <system> <name>测试A</name> <code>testA</code> <datasource>Data Source=.;Initi 阅读全文
posted @ 2020-10-27 16:29 chenze 阅读(123) 评论(0) 推荐(0) 编辑
摘要:我们都知道ORM全称叫做Object Relationship Mapper,也就是可以用object来map我们的db,而且市面上的orm框架有很多,其中有一个框架 叫做dapper,而且被称为the king of ORM。 一:为什么选择Dapper 1. 性能优越: 其实在各大网站上,我们大 阅读全文
posted @ 2020-10-19 16:47 chenze 阅读(1065) 评论(0) 推荐(0) 编辑
摘要:1.BeginInvoke来实现异步 Action action = new Action(delegate () { try { //这儿执行操作 } catch (Exception ex) { } }); action.BeginInvoke(null, null); 2.使用线程 HttpC 阅读全文
posted @ 2020-10-06 10:00 chenze 阅读(160) 评论(0) 推荐(0) 编辑
摘要:1. List<string> planIDList = new List<string>(); planIDList.Add(strPlanid); planIDList = planIDList.Distinct().ToList();//去重 2. 常用树形结构数据处理 public List 阅读全文
posted @ 2020-09-13 12:08 chenze 阅读(127) 评论(0) 推荐(0) 编辑
摘要:生成vb文件指令 使用vs开发人员命令提示符 来执行以下指令 1. -- 指令 wsdl.exe /l:vb /n:webser /out:C:/LoginProxyService.vb http://192.168.1.2/services/Login?wsdl 2.本地的webservice生成 阅读全文
posted @ 2020-09-07 09:07 chenze 阅读(1106) 评论(0) 推荐(0) 编辑
摘要:机器:win10环境:.net4.5HTTP 错误 500.21 - Internal Server Error处理程序“ExtensionlessUrlHandler-Integrated-4.0”在其模块列表中有一个错误模块“ManagedPipelineHandler”引起原因:win10锁定 阅读全文
posted @ 2020-08-18 18:05 chenze 阅读(740) 评论(0) 推荐(0) 编辑
摘要:一. private void button1_Click(object sender, EventArgs e) { string url = "localhost"; byte[] responseArray = null; using (WebClient webClient = new We 阅读全文
posted @ 2020-07-20 09:41 chenze 阅读(229) 评论(0) 推荐(0) 编辑
摘要:在js中获取域名+端口 "http://" + window.location.host 一、C#代码 属性 AbsolutePath 获取 URI 的绝对路径。 AbsoluteUri 获取绝对 URI。 Authority 获取服务器的域名系统 (DNS) 主机名或 IP 地址和端口号。 Dns 阅读全文
posted @ 2020-06-29 15:31 chenze 阅读(4354) 评论(0) 推荐(1) 编辑

有事您Q我
点击右上角即可分享
微信分享提示