//@可以去掉\的特殊作用
string
sOldFile
=
@"c:\temp\baidu_logo.gif
"
;
//下载远程文件到本地
string
path
=
"http://www.baidu.com/img/baidu_logo.gif
"
;
string path2 = @"c:\temp\baidu_logo.gif " ;
System.Net.WebClient a = new System.Net.WebClient();
a.DownloadFile(path,path2);
string path2 = @"c:\temp\baidu_logo.gif " ;
System.Net.WebClient a = new System.Net.WebClient();
a.DownloadFile(path,path2);
产生9位数字随机数:
System.Random rd
=
new
System.Random(
unchecked
((
int
)DateTime.Now.Ticks));
string cardno9 = rd.Next( 100000000 , 999999999 ).ToString() ;
string cardno9 = rd.Next( 100000000 , 999999999 ).ToString() ;
自动完成
只要选择关键词,双击[Tab]键就可以
如输入for,双击[Tab]键
如输入for,双击[Tab]键
调用浏览器
通过指定文档或应用程序文件的名称来启动进程资源,并将资源与新的 System.Diagnostics.Process 组件关联。
Process.Start(" http://www.baidu.com");
Process.Start(" http://www.baidu.com");
判断数据类型
用 is
if (oper is OperationInput)
{
}
else if (oper is OperationOutput)
{
}
{
}
else if (oper is OperationOutput)
{
}
待续。。。