随笔分类 -  C#基础

mysql 的行转列 PIVOT 的使用
摘要:语句:SELECT DataDate , PropertyText , DataValue FROM RPT_ReportProperty p WITH ( NOLOCK ) JOIN RPT_ReportData d WITH ( NOLOCK ) ON p.PropertyID = d.Prop 阅读全文

posted @ 2018-07-16 16:22 chengjunde 阅读(20162) 评论(3) 推荐(0)

比较好的Json 格式数据
摘要:{ "81040753986": [{ "order_info": { "unique_package_reference": "LP00104760730736", "force_smartrouting": "yes", "order_number": "186265656792499700", 阅读全文

posted @ 2018-07-04 09:45 chengjunde 阅读(281) 评论(0) 推荐(0)

.net 下的 HttpRuntime.Cache 应用
摘要:using System;using System.Collections.Generic;using System.Diagnostics;using System.Linq;using System.Threading;using System.Web;using System.Web.Cach 阅读全文

posted @ 2018-07-02 14:34 chengjunde 阅读(186) 评论(0) 推荐(0)

淘海外分发Job 多线程demo
摘要:using System;using System.Collections.Generic;using System.Configuration;using System.Diagnostics;using System.Linq;using System.Text;using System.Thr 阅读全文

posted @ 2018-06-11 13:49 chengjunde 阅读(161) 评论(0) 推荐(0)

监控控制台是否运行的bat
摘要:@echo offrem set secs=5set srvname="TRS.Export.Scheduler.exe" echo.echo echo == 查询计算机服务的状态, echo == 每间隔%secs%秒钟进行一次查询 echo == 如发现其停止,则立即启动。 echo echo. 阅读全文

posted @ 2018-06-05 15:37 chengjunde 阅读(183) 评论(0) 推荐(0)

表实体上面添加特性获取到连接字符串
摘要:public static string ConnectionString(Type type) { try { string tableName = type.Name; string configName = null; object[] arrAttributes = type.GetCust 阅读全文

posted @ 2018-02-01 14:31 chengjunde 阅读(112) 评论(0) 推荐(0)

C# 反射通过GetCustomAttributes方法,获得自定义特性
摘要:http://blog.csdn.net/litao2/article/details/17633107 使用反射访问: 自定义属性的信息和对其进行操作的方法。 一、实例1 1、代码: 如:System.Attribute[] attrs=System.Attribute.GetCustomAttr 阅读全文

posted @ 2017-12-18 13:52 chengjunde 阅读(1863) 评论(0) 推荐(0)

从事件总线和消息队列说起
摘要:http://www.cnblogs.com/Jusfr/p/5256791.html 事件总线(EventBus)及其演进过程必须提到内存模型、传统的队列模型、发布-订阅模型。 内存模型:进程内模型,事件总线(EventBus)在内部遍历消费者(Consumer)列表传递数据; 队列模型:消息或事 阅读全文

posted @ 2017-06-27 16:29 chengjunde 阅读(4021) 评论(0) 推荐(0)

C#使用Sockets操作FTP
摘要:http://blog.csdn.net/foart/article/details/6824551 阅读全文

posted @ 2017-03-15 12:32 chengjunde 阅读(152) 评论(0) 推荐(0)

C# XML对象序列化、反序列化 - PEPE YU
摘要:http://www.tuicool.com/articles/IjE7ban http://www.cnblogs.com/johnsmith/archive/2012/12/03/2799795.html XML 序列化:可以将对象序列化为XML文件,或者将XML文件反序列化为对象还有种方法 使 阅读全文

posted @ 2017-03-11 22:49 chengjunde 阅读(4037) 评论(0) 推荐(0)

NET(C#):XmlArrayItem特性和XmlElement特性在序列化数组的差别
摘要:https://www.mgenware.com/blog/?p=142 比如这样一个类,我们用XmlArrayItem特性标明数组内出现的元素类型: public class a{ [XmlArrayItem(Type = typeof(int)), XmlArrayItem(Type = typ 阅读全文

posted @ 2017-03-11 22:48 chengjunde 阅读(6638) 评论(1) 推荐(3)

SoapUI使用方法-01发送http请求
摘要:soap ui http://blog.csdn.net/russ44/article/details/51680083 一、发送HTTP请求消息 1、打开soapUI。 2、新建一个项目,实例如下: 点击ok后在soapUI界面左侧会显示出此项目,如图: 阅读全文

posted @ 2017-02-27 20:24 chengjunde 阅读(462) 评论(0) 推荐(0)

C#将字符转换成utf8编码 GB321编码转换
摘要:public static string get_uft8(string unicodeString) { UTF8Encoding utf8 = new UTF8Encoding(); Byte[] encodedBytes = utf8.GetBytes(unicodeString); String de... 阅读全文

posted @ 2017-02-27 18:04 chengjunde 阅读(20423) 评论(0) 推荐(2)

【整理】C#文件操作大全(SamWang)
摘要:【整理】C#文件操作大全(SamWang) 文件与文件夹操作主要用到以下几个类: 1.File类: 提供用于创建、复制、删除、移动和打开文件的静态方法,并协助创建 FileStream 对象。 msdn:http://msdn.microsoft.com/zh-cn/library/system.i 阅读全文

posted @ 2017-02-27 18:03 chengjunde 阅读(285) 评论(0) 推荐(0)

数组转成字符串互换
摘要:string str = "1,2,3,4,5,6,7";string[] strArray = str.Split(','); //字符串转数组str = string.Empty;str = string.Join(",", strArray);//数组转成字符串 阅读全文

posted @ 2017-02-27 16:31 chengjunde 阅读(656) 评论(0) 推荐(0)

c#一个FTP操作封装类FTPHelper
摘要:参考了网上一些代码,作了一些调整优化。 [csharp] view plain copy print? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System 阅读全文

posted @ 2017-02-27 15:34 chengjunde 阅读(409) 评论(0) 推荐(0)

对集合排序的三种方式
摘要:http://www.cnblogs.com/darrenji/p/4397412.html 以上,OrderBy返回的类型是IEnumerable<Student>。 如果想使用List<T>的Sort方法,就需要让Student实现IComparable<Student>接口。 让Student 阅读全文

posted @ 2017-01-20 11:15 chengjunde 阅读(516) 评论(0) 推荐(0)

C#抽象类及其方法的学习
摘要:http://www.cnblogs.com/flyinthesky/archive/2008/06/18/1224774.html 在C#中使用关键字 abstract 来定义抽象类和抽象方法。 不能初始化的类被叫做抽象类,它们只提供部分实现,但是另一个类可以继承它并且能创建它们的实例。 "一个包 阅读全文

posted @ 2017-01-13 09:23 chengjunde 阅读(124) 评论(0) 推荐(0)

haproxy+keepalived实现高可用负载均衡
摘要:转自:http://www.cnblogs.com/dkblog/archive/2011/07/06/2098949.html 软件负载均衡一般通过两种方式来实现:基于操作系统的软负载实现和基于第三方应用的软负载实现。LVS就是基于Linux操作系统实现的一种软负载,HAProxy就是开源的并且基 阅读全文

posted @ 2016-12-14 13:43 chengjunde 阅读(221) 评论(0) 推荐(0)

WCF中的ServiceHost初始化两种方式
摘要:http://fwhyy.com/2010/07/wcf-servicehost-initialization-in-two-ways/ WebService之XFire和SOAP实例(基于JAVA) http://www.cnblogs.com/zhongshengzhen/p/4290670.h 阅读全文

posted @ 2016-12-14 13:36 chengjunde 阅读(625) 评论(0) 推荐(0)

导航