随笔分类 -  VS

.NET Core 6 类的私有静态变量关联异常
摘要:因为,在.NET Core 6(以及其他.NET版本)中,类的私有静态变量在类第一次被任何方式引用时被初始化。 所以, 1: 在Debug时,如果跟踪某个方法是查看类的私有静态变量被访问前,无法单步跟踪查看这些静态变量的赋值。 2: 如果静态变量的初始化涉及到复杂的计算或者可能抛出异常,那么这个初始 阅读全文
posted @ 2024-01-11 16:26 zencorn 阅读(31) 评论(0) 推荐(0)
TFS 自动同步Server 端文件的批处理命令
摘要:目前在我们组的工作中很多时候需要将TFS上Server端的代码自动无人值守的同步到本地中来, 找到了一些解决方案的资料http://bbs.scmroad.com/archiver/?tid-21003.html。经过试验,我们总结成以下步骤,希望对大家有所借鉴。Steps:1. 点选VS Source Explorer 上面的TFS目录列表。2. 新建一个TFS 的 workspace。3. 点击Source Control Folder 。4. 在Source folder中选择你要用从Server端同步的目录。5. 在Local Folder中选择本地同步的文件夹。 6.打开本地注册表, 阅读全文
posted @ 2012-08-28 15:40 zencorn 阅读(2514) 评论(0) 推荐(1)
Using C# Generics read & update XML file .
摘要:publicList<XmlElement>GetNodeList(){list=newList<XmlElement>();XmlNode nodeFirst=document.SelectSingleNode("Ele\NodeFirst")); XmlNode nodeSecond=document.SelectSingleNode("Ele\NodeSecond")); list.Add(nodeFirst);list.Add(nodeTwo); returnlist;}List<XmlElement> New 阅读全文
posted @ 2011-03-31 14:30 zencorn 阅读(184) 评论(0) 推荐(0)
C# Get a folder or file list which finished sequence line. 直接得到 排序后 的 文件列表
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--public class DirComparer : System.Collections.IComparer{public int Compare(object x, object y){return y.ToString().CompareTo(x.ToString());}}DirectoryInfodi=newDirectoryInfo(“FolderPath”); ArrayListdirA 阅读全文
posted @ 2011-01-12 13:50 zencorn 阅读(222) 评论(0) 推荐(0)
C# UnInstall Application by name.
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicvoidUninstallGenWFM(){stringstrReturnMsg;stringproductGuid;stringsubKey;stringdisplayName;stringstrMajVersion;stringstrGenBuildNum;stringstrLocalInsFolder;stringuninstallCmd;stringstrUnistallCm 阅读全文
posted @ 2010-12-29 13:46 zencorn 阅读(302) 评论(0) 推荐(0)
Removing reports / report folder by SSRS (SQL SERVER REPORTING SERVICE)
摘要:Goal :Remove the report folder from backstage.Implement Steps:1. Create a C# console application project.2. Add one web reference into the project. [VS2010 : http://localhost:80/ReportServer/ReportService2010.asmx]3. Open the “Web References/WebServicelocalhost” folder from the project location dire 阅读全文
posted @ 2010-12-15 15:35 zencorn 阅读(459) 评论(0) 推荐(0)
解决 NET FTP Response error: (503) .
摘要:1. 在应用。NET 访问FTP的Response来返回时,出现了如下错误。2. 参考如下MSDN 和一些网络资源,尝试后解决了此问题. >Ftp GetFileSize randomly throws FTP error 503 (Bad Sequence of Commands) >FtpWebRequest re-sending USER and PASS commands ha... 阅读全文
posted @ 2010-04-30 23:31 zencorn 阅读(964) 评论(0) 推荐(1)
C#-域内-远程机-文件信息-注册表-访问。
摘要:1. 获取远程机IP地址。代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicstringGetMachineIPAddress(stringstrMachineName){stringstrMachineIP;PingoP=newPin... 阅读全文
posted @ 2010-03-24 15:52 zencorn 阅读(1509) 评论(0) 推荐(1)
How to make cross-thread calls. (多线程操控窗体控件之不可行)
摘要:在准备调起一个线程来操控一个界面上的ProgressBar的状态时,遇到了How to make cross-thread calls.这种错误.[代码]More Details See herehttp://msdn.microsoft.com/en-us/library/ms171728.aspx 阅读全文
posted @ 2009-08-28 09:22 zencorn 阅读(238) 评论(0) 推荐(0)
改变TFS本地映射路径.
摘要:想改变在原来映射过本地的TFS路径,是可以在VS的IDE环境里完成的。1.首先找到基于TFS管理的本地Workspaces.2. 然后选择Edit,并在本地的workspace中把原来的Active的路径删掉(推荐),然后添加进一个新路径文件夹就可以重新设置本地TFS路径了。 阅读全文
posted @ 2009-07-05 21:39 zencorn 阅读(1240) 评论(2) 推荐(1)