C#
菜刀2008
我是程序员
展开
-
pdf,iTextSharp,写入表格数据
public class ApiPdf { private DataTable dt = null; public void GetData() { dt = new DataTable(); dt.Columns.Add("id",typeof(string)); dt.Column...原创 2019-10-24 16:01:55 · 1049 阅读 · 0 评论 -
C#把金额转换为汉字表达式
C#把金额转换为汉字表达式原创 2014-09-04 08:44:17 · 1506 阅读 · 0 评论 -
C#元祖Tuple的事例
数组合并了相同类型的对象,而元祖合并了不同类型的对象,元祖起源于函数编程语言(F#),.NET Framework定义了8个泛型Tuple(自NET4.0)和一个静态的Tuple类,他们作用元祖的工厂,这里的不同泛型Tuple类支持不同数量的元素,例如:Tuple<T1>包含一个元素,Tuple<T1,T2>包含2个元素,依次类推原创 2014-07-14 10:09:12 · 4843 阅读 · 3 评论 -
c#获取电脑内部信息
c#获取电脑内部信息,得到电脑CPU序列号,得到客户端IP地址原创 2014-07-13 19:03:13 · 1029 阅读 · 0 评论 -
C# System.EnterpriseServices自动完成事物
using System.EnterpriseServices; [Transaction(TransactionOption.Required)] public class StudentService : ServicedComponent { private readonly string connString =原创 2014-05-31 10:20:20 · 1474 阅读 · 0 评论 -
C# Interlocked类的事例
static void Main(string[] args) { int a = 20; int b = 20; int c = 0; //对两个 32 位整数进行求和并用和替换第一个整数,上述操作作为一个原子操作完成 Interlocked.Add原创 2014-05-31 09:59:01 · 2119 阅读 · 0 评论 -
C# SqlCommand的ExecuteXmlReader事例
原创 2014-05-31 10:56:02 · 791 阅读 · 0 评论 -
C# FTP操作类
转载地址:http://www.cnblogs.com/tonybinlj/archive/2009/08/04/1538280.html转载 2014-06-12 11:19:43 · 492 阅读 · 0 评论 -
Report报表对数据进行分组显示
利用VS2008,我们可以制作报表,今天,我给大家演示制作分组的报表:原创 2014-06-12 12:55:30 · 1089 阅读 · 0 评论 -
C#关于List的find的误解
先看下面的代码:原创 2014-07-03 08:56:48 · 5334 阅读 · 0 评论 -
c#将List<T>转换成DataSet
c#将List<T>转换成DataSet原创 2014-06-13 14:37:31 · 3134 阅读 · 0 评论 -
C# 分割字符串
static void Split_1() { string data = "aaa.bbb.ccc"; //以.符合分割字符串 string[] dataArray = data.Split('.'); foreach (string item in dataArray)原创 2014-05-23 13:25:06 · 600 阅读 · 0 评论 -
C# goto用法事例
static void Main(string[] args) { goto tag1; System.Console.WriteLine("这行代码不会被执行!"); tag1: System.Console.WriteLine("跳到这里继续执行!");原创 2014-05-23 12:01:36 · 8455 阅读 · 0 评论 -
C#WebRequest设置代理访问
//WebRequest设置代理,抓起数据 System.Net.WebProxy wp = new System.Net.WebProxy("192.168.0.100",true); wp.Credentials = new System.Net.NetworkCredential("username","password");原创 2014-06-06 09:18:23 · 2808 阅读 · 0 评论 -
C#读取和写入注册表
RegistryKey hklm = Microsoft.Win32.Registry.LocalMachine; RegistryKey hkSoftware = hklm.OpenSubKey("Software"); //只读 //RegistryKey hkMicrosoft = hkSoftware.OpenS原创 2014-06-05 18:09:59 · 2885 阅读 · 0 评论 -
C#WebClient上传文件
//上传文件 System.Net.WebClient client = new System.Net.WebClient(); client.UploadFile("http://www.ourwebsite.com/newfile.htm","c:\\file\\demo.htm"); //上传图片原创 2014-06-06 09:12:03 · 963 阅读 · 0 评论 -
C#获取单个字符的拼音声母
C#获取单个字符的拼音声母,C#汉字转拼音原创 2014-08-24 07:07:11 · 1324 阅读 · 0 评论 -
C#格式化数值数据
C#格式化数值数据,C#格式化原创 2014-09-20 10:15:58 · 1810 阅读 · 0 评论 -
C#验证字符串是否是数字,是否包含中文,是否是邮箱格式,是否是电话格式
C#验证字符串是否是数字,C#验证字符串是否包含中文,C#验证字符串是否是邮箱格式,C#验证字符串是否是电话格式,C#验证字符串是否是邮政编码,C#验证字符串是否是手机号码原创 2014-08-17 10:48:36 · 3019 阅读 · 0 评论 -
C#导出crm系统plugin的dll文件
ApiSdkPluginAssembly sdkPlugin = new ApiSdkPluginAssembly(service);sdkPlugin.ImportPlugin("FwCrmExtSolution.Plugins");public void ImportPlugin(string name) { QueryExpression query = ...原创 2018-05-18 15:16:53 · 363 阅读 · 0 评论 -
dynamic发布之C#和js
1 C#发布:public class PublishXmlReq { public IOrganizationService service = null; /// <summary> /// 发布窗体 /// </summary> public void PublishSystemForm(s...原创 2018-04-13 17:32:21 · 416 阅读 · 0 评论 -
sql关键字top和apply的用法
sql关键字top和apply的用法原创 2015-11-12 14:48:19 · 862 阅读 · 0 评论 -
reportservice制作柱状图
reportservice制作柱状图原创 2014-12-13 10:16:32 · 895 阅读 · 0 评论 -
reportservie报表制作漏斗图
reportservie报表制作漏斗图原创 2014-12-13 11:11:12 · 912 阅读 · 0 评论 -
reportservice制作饼状图
reportservice制作饼状图原创 2014-12-13 10:39:55 · 958 阅读 · 0 评论 -
创建Wcf数据服务的事例
创建Wcf数据服务的事例,创建Wcf Data Service原创 2014-11-15 09:45:27 · 812 阅读 · 0 评论 -
C#发送邮件
C#发送邮件原创 2014-09-05 08:57:02 · 920 阅读 · 0 评论 -
C#对象转json字符串和json字符串转对象
C#对象转json字符串,C#json字符串转对象,C#DataTable对象转json字符串,C#把集合转成DataTable原创 2014-09-03 09:03:17 · 12969 阅读 · 0 评论 -
启动Cisco AnyConnet Secure Moblity Agent服务
本地计算机上的服务启动后停止。某些服务在未由其他服务或者程序使用时将自动停止。the vpn client agent was unalbe to create the inerprocess communication depot原创 2014-09-26 08:50:11 · 4609 阅读 · 1 评论 -
C#操作Cookie
ASP.NET操作Cookie原创 2014-09-02 08:42:52 · 1314 阅读 · 0 评论 -
C#操作数据库SqlHelper类
C#操作数据库SqlHelper类原创 2014-09-01 09:09:55 · 1749 阅读 · 1 评论 -
C#把对象类型转化为指定类型,转化失败时返回该类型默认值
C#把对象类型转化为指定类型,C#通用类型扩展方法类原创 2014-09-13 14:42:53 · 3557 阅读 · 0 评论 -
C#获取电脑的相关信息
C#获取电脑的相关信息,C#获取CPU序列号代码,C#获取网卡Mac地址,C#操作系统的登录用户名,ASP.NET得到客户端IP地址原创 2014-08-31 08:52:43 · 1038 阅读 · 0 评论 -
sql游标事例
declare @Id varchar(50)declare cur cursor for select * from city --定义游标open cur --打开游标fetch next from cur into @Id --把提取操作的列数据放到局部变量中while(@@fetch_status=0) --返回被 FETCH 语句执行的最后游标的状态,而不是任何当前被连原创 2014-05-14 14:45:27 · 474 阅读 · 0 评论 -
sql杀死数据库所有进程
gocreate proc p_killspid (@dbname sysname )asdeclare @s nvarchar(1000)declare tb cursor local for select s='kill '+cast(spid as varchar) from master..sysprocesses where dbid=db_id(@dbname)原创 2014-05-14 14:42:01 · 2087 阅读 · 0 评论 -
C# 读取DataTable使用Reader方式
private static void PrintDataTableWithReader(DataTable dt) { DataTableReader dr = dt.CreateDataReader(); while(dr.Read()) { int len =原创 2014-05-11 18:04:59 · 3899 阅读 · 0 评论 -
C# 反射对象的字段属性和实现的接口
/// /// 反射字段 /// public void ListFileds(Type t) { var filedNames = t.GetFields().Select(a => a.Name).ToArray(); foreach(string name in f原创 2014-05-11 17:54:03 · 854 阅读 · 0 评论 -
crm2011 获取实体的ObjectTypeCode
public static int GetObjectTypeCode(IOrganizationService service, string enName) { RetrieveEntityRequest request = new RetrieveEntityRequest() { LogicalName =原创 2014-05-11 16:17:24 · 1196 阅读 · 0 评论 -
C# 创建自定义转换
public class Rectangle { public int Width { get; set; } public int Height { get; set; } public Rectangle() { } public Rectangle(int w,int h) {原创 2014-05-11 13:24:14 · 406 阅读 · 0 评论 -
C# 重载操作符
public class Point { public int X { get; set; } public int Y { get; set; } public Point(int x,int y) { this.X = x; this.Y = y;原创 2014-05-11 13:08:43 · 629 阅读 · 0 评论