Jenney Zhao

导航

随笔分类 -  C#

联通编码问题
摘要:(部分转自http://www.cnblogs.com/hongfei/p/3648794.html)当我们在 windows 的记事本里新建一个文件,输入"联通"两个字之后,保存,关闭,然后再次打开,会发现这两个字已经消失了,代之的是几个乱码!其实这是因为GB2312编码与UTF8编码产生了编码冲... 阅读全文

posted @ 2015-11-23 14:05 Jenney Zhao 阅读(793) 评论(0) 推荐(0)

远程启动程序
摘要:背景昨天遇到一个问题:本地电脑(Win7 x64)想要远程启动另一台电脑(Windows Server 2012 R2)上的一个程序(为*.exe程序),要求是:在不改变远程电脑配置的前提下,被启动的程序能弹出console界面,并有run as administrator的效果(类似于右击某个程序... 阅读全文

posted @ 2015-11-19 00:26 Jenney Zhao 阅读(3555) 评论(0) 推荐(0)

扩展Visual Studio Test Project:自定义TestClassAttribute - part 2
摘要:[转] http://blogs.msdn.com/b/vstsqualitytools/archive/2009/09/04/extending-the-visual-studio-unit-test-type-part-2.aspx代码下载地址:http://archive.msdn.microsoft.com/UnitTestExtendSample/Release/ProjectReleases.aspx?ReleaseId=4030In part 1, we introduced Unit Test Type Extensibility, highlighting the main 阅读全文

posted @ 2013-10-11 16:16 Jenney Zhao 阅读(470) 评论(0) 推荐(0)

扩展Visual Studio Test Project:自定义TestClassAttribute - part 1
摘要:背景使用Visual Studio 2010 Test Project创建我们的automation test case时,预定义的TestClassAttribute可能会有以下局限:假设某些automation test case要求在version 1.0下跑;某些要求在version 1.1下跑,或在不同的环境下执行不同的case,预定义的TestClassAttribute不能在运行中自动决定某些case是否可以run,某些是否不能run(至少现在我没找到解决方法)。但Microsoft提供了一些类库可供我们自定义TestClassAttribute,从而实现以上目的。[转]http 阅读全文

posted @ 2013-10-11 15:12 Jenney Zhao 阅读(928) 评论(0) 推荐(0)

Build Action
摘要:The Build Action property indicates what Visual Studio does with a file when a build is executed. Build Action can have one of several values:None - The file is not included in the project output group and is not compiled in the build process. An example is a text file that contains documentation, s 阅读全文

posted @ 2013-01-17 13:30 Jenney Zhao 阅读(190) 评论(0) 推荐(0)

ToString() 格式化字符串总结
摘要:ToString()的标准格式化字符串分为3大类:枚举类型的格式化字符串,数值类型的格式化字符串,和日期时间类型的格式化字符串。日期时间类型的格式化字符串请见我的博客DateTime格式字符串。Enumeration Format StringsFormat stringResultG or gDisplays the enumeration entry as a string value, if possible, and otherwise displays the integer value of the current instance. If the enumeration is d 阅读全文

posted @ 2012-11-07 14:58 Jenney Zhao 阅读(294) 评论(0) 推荐(0)

DateTime 格式字符串
摘要:标准 DateTime 格式字符串详见:http://msdn.microsoft.com/zh-cn/library/az4se3k1(VS.80).aspx格式说明符名称说明d短日期模式表示由当前 ShortDatePattern 属性定义的自定义 DateTime 格式字符串。例如,用于固定区域性的自定义格式字符串为“MM/dd/yyyy”。D长日期模式表示由当前 LongDatePattern 属性定义的自定义 DateTime 格式字符串。例如,用于固定区域性的自定义格式字符串为“dddd, dd MMMM yyyy”。f完整日期/时间模式(短时间)表示长日期 (D) 和短时间 (t 阅读全文

posted @ 2012-10-24 13:21 Jenney Zhao 阅读(568) 评论(0) 推荐(0)

使用mstest.exe 命令行跑test case(不安装Visual Studio 2010)
摘要:怎样在没有安装VS2010的环境里用mstest.exe跑test case?(注:以下实验在64位Windows 7上通过)1. 首先在装有VS2010的环境里,新建一个文件夹,如C:\Users\username\Desktop\mstestCommandLine(注意文件夹名不能有空格,否则运行下面的脚本会有问题),然后把下面的脚本getmstest.bat复制到此目录下,运行getmstest.bat,这个bat会把mstest.exe需要的类库及注册表都导入到当前目录下一个叫mstest的文件夹里getmstest.bat@echo offsetlocalset here=%~dp0 阅读全文

posted @ 2012-09-14 13:49 Jenney Zhao 阅读(2098) 评论(0) 推荐(3)

TypeName of CA1505 is AvoidUnmaintainableCode, not AvoidUnmantainableCode.
摘要:TypeName of CA1505 isAvoidUnmaintainableCode. The typename from below link has error:http://msdn.microsoft.com/en-us/library/bb386043.aspx 阅读全文

posted @ 2010-08-19 20:55 Jenney Zhao 阅读(261) 评论(0) 推荐(0)

little-endian and big-endian
摘要:little-endian and big-endian 阅读全文

posted @ 2010-06-29 10:43 Jenney Zhao 阅读(360) 评论(0) 推荐(0)

XmlRootAttribute与XmlTypeAttribute
摘要:XmlRootAttribute与XmlTypeAttribute 阅读全文

posted @ 2010-06-22 18:00 Jenney Zhao 阅读(1175) 评论(2) 推荐(0)

由类型名得到该类型
摘要:利用C#的反射机制:string typeName="MyNameSpace.MyClassOne";Type myClassType=Type.GetType(typeName);orType myClassType=Type.GetType(typeName,true);注:当返回的Type为NULL时,可用Type myClassType=Type.GetType(typeName,true... 阅读全文

posted @ 2010-06-08 16:31 Jenney Zhao 阅读(275) 评论(0) 推荐(0)