上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 76 下一页

2018年7月24日

C#路径中获取文件全路径、目录、扩展名、文件名称

摘要: 常用函数 需要引用System.IO 直接可以调用Path的静态方法 程序在桌面运行 Path类介绍 阅读全文

posted @ 2018-07-24 13:25 itjeff 阅读(1564) 评论(0) 推荐(0)

NET二进制图片存储与读取的常见方法,iTextSharp添加图片生成PDF文件

摘要: public void iTextSharpCreatPDF() { string pdfpath = System.Web.HttpContext.Current.Server.MapPath("~/log/DPD/"); string imagepath = System.Web.HttpContext.Current.Serv... 阅读全文

posted @ 2018-07-24 11:07 itjeff 阅读(557) 评论(0) 推荐(0)

2018年7月17日

Type.GetType()反射另外项目中的类时返回null的解决方法

摘要: 项目1:ProjectA namespace ProjectA { public class paa { .... } } Type.GetType("paa")返回null Type.GetType("ProjectA.paa")返回正确 项目2:ProjectB 引用了ProjectA Type 阅读全文

posted @ 2018-07-17 11:43 itjeff 阅读(1237) 评论(0) 推荐(0)

2018年7月11日

C#中对于Enum类型的遍历

摘要: 假设有enum类型定义为MyEnumType 则可以这样遍历: //遍历 枚举类型中的所有成员 foreach (MyEnumType type in Enum.GetValues(typeof(MyEnumType))) foreach (MyEnumType type in Enum.GetVa 阅读全文

posted @ 2018-07-11 11:42 itjeff 阅读(759) 评论(0) 推荐(0)

2018年7月9日

读取word到二进制,再转成word

摘要: static void Main(string[] args) { try { var strParams = new Dictionary(); string base64 = string.Empty; var userName = ... 阅读全文

posted @ 2018-07-09 17:11 itjeff 阅读(1215) 评论(0) 推荐(0)

2018年6月29日

sql左右连接测试

摘要: with a as (select 1 as id, 'name1'as nameunionselect 2 as id, 'name2'as nameunionselect 3 as id, 'name3'as nameunionselect 4 as id, 'name4'as nameunio 阅读全文

posted @ 2018-06-29 10:11 itjeff 阅读(175) 评论(0) 推荐(0)

2018年6月22日

期权、RSU的区别与行权事宜

摘要: 科普一下常见的股票、期权、股票增值权、虚拟股票等常见的激励方式,以及在兑换或行权的一些相关问题。股票(Stock):股票市场也称权益市场,是专门对股票进行公开交易的市场,包括股票的发行和转让,分为一级市场和二级市场。当股份公司第一次向投资者出售原始股或在原始股基础上增发新股时,就借助于一级市场来完成 阅读全文

posted @ 2018-06-22 14:23 itjeff 阅读(12455) 评论(0) 推荐(0)

2018年6月6日

C#中int、long、float、double、decimal最大值最小值

摘要: 最近在将java上写的一个简单的表达式求值计算器移植到Windows Phone 8,java中double的精度问题是很明显的,解决办法是改用BigDecimal类。所以觉得C#中用double也是不太好的。C#中用作精度计算的一个数据类型是decimal,对应的类是Decimaldecimal的 阅读全文

posted @ 2018-06-06 15:07 itjeff 阅读(4458) 评论(0) 推荐(0)

C#整数三种强制类型转换int、Convert.ToInt32()、int.Parse()、string到object 的区别

摘要: 1、int适合简单数据类型之间的转换,C#的默认整型是int32(不支持bool型); 2、int.Parse(string sParameter)是个构造函数,参数类型只支持string类型; 3、Convert.ToInt32()适合将Object类型转换为int型; 4、Convert.ToI 阅读全文

posted @ 2018-06-06 14:41 itjeff 阅读(8622) 评论(0) 推荐(1)

2018年5月31日

Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

摘要: For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, which I believe is a new feature introduced in VS 2017. Go to Tools > 阅读全文

posted @ 2018-05-31 13:30 itjeff 阅读(288) 评论(0) 推荐(0)

上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 76 下一页

导航