随笔分类 -  C#-基本操作

摘要:C#获取dynamic(动态)实体的属性值 List<student> item= conn.Query<student>($"select * from 表 where id=123 ").ToList(); foreach (System.Reflection.PropertyInfo p in 阅读全文
posted @ 2022-12-09 11:46 人生为卒 阅读(1764) 评论(0) 推荐(0)
摘要:转载:http://t.zoukankan.com/gaohongchen01-p-5535694.html 本文使用C#开发Winform应用程序,通过调用<WebXml/>(URL:http://www.webxml.com.cn)的WebService服务WeatherWS来获取天气预报数据。 阅读全文
posted @ 2022-10-20 11:10 人生为卒 阅读(928) 评论(0) 推荐(0)
摘要:添加的两个地址: 网络地址包: https://api.nuget.org/v3/index.json https://www.nuget.org/api/v2/ 本地离线包: C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ 阅读全文
posted @ 2022-02-15 16:32 人生为卒 阅读(527) 评论(0) 推荐(1)
摘要:using System; namespace weituo { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); Console.WriteLine("写法一!"); func1 阅读全文
posted @ 2022-02-08 15:00 人生为卒 阅读(41) 评论(0) 推荐(0)
摘要:#region 复制对象 #region MyRegion private static Dictionary<string, object> _Dic = new Dictionary<string, object>(); public static TOut TransExp<TIn, TOut 阅读全文
posted @ 2022-02-08 11:52 人生为卒 阅读(319) 评论(0) 推荐(0)
摘要:参考此网站 https://cron.qqe2.com/ 阅读全文
posted @ 2022-01-14 10:06 人生为卒 阅读(31) 评论(0) 推荐(0)
摘要:转载:https://www.cnblogs.com/wangyonglai/p/11327323.html 服务端代码 using System; using System.Collections.Generic; using System.ComponentModel; using System 阅读全文
posted @ 2020-09-18 09:38 人生为卒 阅读(363) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Data; using System.Data.SQLite; using System.IO; using System.Linq; using System.Text; us 阅读全文
posted @ 2020-07-27 10:03 人生为卒 阅读(170) 评论(0) 推荐(0)
摘要:转载: https://blog.csdn.net/chinahuyong/article/details/93752942?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.n 阅读全文
posted @ 2020-07-01 14:59 人生为卒 阅读(252) 评论(0) 推荐(0)
摘要:通过账号密码访问网络路径的方法 //访问路径登录信息 string _Server = @"192.168.0.95"; string _ID = "administrator"; string _Password = "testadmin"; using (SharedTool tool = ne 阅读全文
posted @ 2020-06-16 10:55 人生为卒 阅读(814) 评论(0) 推荐(0)
摘要:/// /// 发现并删除文件,不删除本文件 /// /// 需要遍历的文件夹路径 /// 当前的文件完整路径 /// 当前文件的文件名 public void findAllFile(string file, string FullName, string FileNa... 阅读全文
posted @ 2019-08-05 14:23 人生为卒 阅读(289) 评论(0) 推荐(0)
摘要:①将csv读取到datatable ②将datatable写到空白exel(使用NPOI) 阅读全文
posted @ 2019-07-30 16:52 人生为卒 阅读(1348) 评论(0) 推荐(0)
摘要:using System; using System.Diagnostics; using System.Management; public class DeviceMonitor { static readonly PerformanceCounter cpuCounter = new PerformanceCounter("Processor", "% Processor... 阅读全文
posted @ 2019-06-20 11:43 人生为卒 阅读(192) 评论(0) 推荐(0)
摘要:/// /// 网络测试 /// private void TestNet( ) { //远程服务器IP string ipStr = "192.168.0.8"; //构造Ping实例 Ping pin... 阅读全文
posted @ 2019-06-20 11:41 人生为卒 阅读(272) 评论(0) 推荐(0)
摘要:转摘: https://blog.csdn.net/sgmcumt/article/details/83021616 log4net不输出日志文件主要有以下几个原因: 1 没有在AssemblyInfo文件中添加下面的代码:[assembly: log4net.Config.XmlConfigura 阅读全文
posted @ 2019-06-06 14:01 人生为卒 阅读(1933) 评论(0) 推荐(0)
摘要:var property = condition.GetType().GetProperty("PropertyName"); property.SetValue(condition, "value", null); 阅读全文
posted @ 2018-10-26 12:00 人生为卒 阅读(94) 评论(0) 推荐(0)
摘要:转载 : http://www.jb51.net/web/96169.html 阅读全文
posted @ 2016-06-29 16:41 人生为卒 阅读(137) 评论(0) 推荐(0)
摘要:/// /// 邮件发送 /// /// 用于 SMTP 事务的主机的名称或 IP 地址 private void SendMail(string server = "smtp.qq.com") { try { /... 阅读全文
posted @ 2016-06-29 15:56 人生为卒 阅读(167) 评论(0) 推荐(0)
摘要:http://zhidao.baidu.com/link?url=fT3tDQPpcNi Yh8ki626wx8uvaEaeVTs9Xbdm-Jl7eWZioqstjXzzsexHS7W5k_L2d_BCTOK0JToYQKew4vK 阅读全文
posted @ 2016-04-18 13:41 人生为卒 阅读(227) 评论(0) 推荐(0)
摘要:private static bool ReadXmlFileSet() { bool ReadXmlFileSet = false; string appPath = ""; string _appPath = ""; //读取Xml数据信息对象 ... 阅读全文
posted @ 2016-03-18 16:51 人生为卒 阅读(189) 评论(0) 推荐(0)