Resharper 5.0 beta 下载地址附(keygen注册码 SN)
一款NET 插件
刚开始下了4.5不支持vs2010,后来下了5.0支持,用了1天卸载了,VS2010已经很慢了,感觉装了更慢了,
http://www.jetbrains.com/resharper/beta/beta.html
keygen注册码 SN如下:
一款NET 插件
刚开始下了4.5不支持vs2010,后来下了5.0支持,用了1天卸载了,VS2010已经很慢了,感觉装了更慢了,
http://www.jetbrains.com/resharper/beta/beta.html
keygen注册码 SN如下:
C#查看文件和修改隐藏属性例子如下:
FileInfo fileInfo = new FileInfo(path);
MakeFileHidden(fileInfo);
// 显示文件是否隐藏
Console.WriteLine("Is file hidden? = " +
((fileInfo.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden));
}
C#如何显示文件创建时间,源码如下:
string path = @"c:\temp\MyTest.txt";
FileInfo fileinfo = new FileInfo(path);
DisplayTimestamps(fileinfo);
发现一个好东西:备忘先,该源码类提供一些windows 7 或者vista中特性的东西
http://code.msdn.microsoft.com/WindowsAPICodePack
Windows® API Code Pack for Microsoft® .NET Framework
一个取整Truncate,一个包含小数Round
decimal pi = (decimal)System.Math.PI;
decimal decRet = System.Math.Truncate(pi);//取整数部分3
double trouble = 5.555;
double dblRet = System.Math.Truncate(trouble);//取浮点数部分5.0
double ddround=System.Math.Round(trouble,2);显示为5.56 4舍五入,保留几位小数,2表示2位
I haved'n write blog a few days, sometimes want's write something,but didn't,after a few days, of course forgot almost几天没写,有时想写,但是没写,结果忘了差不多了。转化为10进制,使用的是convert.ToInt32(string,原来的进制数)。例子如下:
下载地址:http://www.red-gate.com/products/reflector/index.htm
参考:http://visualstudiogallery.msdn.microsoft.com/zh-cn/95789cdb-08f9-4dae-9b2f-fc45a452ad77
英文使用方法:
.NET Reflector Pro is an add-in to Visual Studio that lets you debug third-party code and assemblies, even if you don't have the source.
下面的示例创建Uri 类的实例,并用它来创建WebRequest 实例。
Uri siteUri = new Uri("http://www.ajaxcn.net/");
WebRequest wr = WebRequest.Create(siteUri);
URI 是 Intranet 或 Internet 上可由应用程序使用的资源的一种简洁表示形式。Uri 类定义了属性和方法来处理 URI,包括分析、比较和组合。Uri 类属性是只读的;若要创建可修改的对象,请使用 UriBuilder 类。
http://msdn.microsoft.com/zh-cn/library/system.uri(VS.85).aspx一个例子如下:
SaveFileDialog dialog = new SaveFileDialog();
dialog.DefaultExt = ".txt";
dialog.Filter = "文本文件(*.txt)|*.txt";
dialog.Title = "保存到:";
if (dialog.ShowDialog() == DialogResult.OK)
{
StreamWriter writer = new StreamWriter(dialog.FileName);
...
writer.Close();
}
C#中判断字符串是否含有中文的方法时:根据字段的字符长度大于长度 if (System.Text.Encoding.Default.GetBytes(str).Length > str.Length) ,如果大于就是含有中文, sql 2000中如何判断含有中文呢?类似根据字段长度与字符长度不等 select * from tablename where len(字段)<>datalength(字段)