本文共 1296 字,大约阅读时间需要 4 分钟。
Random random = new Random(( int)DateTime .Now.Ticks & 0x0000FFFF);
在测试项目的配置文件的末尾里添加
..\TestResults
或者用msbuild的命令
MSBuild /t:Clean MyProject.csproj
Regular literal | Verbatim literal | Resulting string |
---|---|---|
"Hello" | @"Hello" | Hello |
"Backslash: \\" | @"Backslash: \" | Backslash: \ |
"Quote: \"" | @"Quote: """ | Quote: " |
"CRLF:\r\nPost CRLF" | @"CRLF: Post CRLF" | CRLF: Post CRLF |
2用语言的保留关键字作为变量名(不是很建议这么做
× object object=null;
√ object @bject=null;
using System.Reflection; [Test] public void 返回当前方法名() { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); MethodBase currentMethodName = sf.GetMethod(); Console.WriteLine(currentMethodName.ToString()); }//Void 返回当前方法名()
在web.config里配置
< httpRuntime targetFramework ="4.5 " enableVersionHeader ="false " />
转载地址:http://pjmjo.baihongyu.com/