摘要://获得下载文件的大小 private static long GetFileSize(string url, out bool progressKnown) { HttpWebResponse response = null; long size = -1; try ...
阅读全文
随笔分类 - WinForm .NET
windows编程
摘要:Cache这东西怎么个好用就不用我多说了,只不过过去都是在Web项目上使用,没想到在Winform上也可以使用,方法如下: HttpRuntime httpRT = new HttpRuntime(); Cache cache = HttpRuntime.Cache;
阅读全文
摘要:在使用Process类来打开文件时,如果文件类型未知,会得到错误代码为ERROR_NO_ASSOCIATION 的Win32Exception。解决方法很简单 ProcessStartInfotest=newProcessStartInfo();test.FileName="wjh.wjh";te...
阅读全文
摘要:一般性的错误日至处理,可以记录到系统得日至管理日志类型: ImportsSystem.Diagnostics'Windows事件日志记录PublicClassEventLogHelperPrivateSharedReadOnlym_eventLogSourceAsString="IssueVis...
阅读全文

浙公网安备 33010602011771号