[WCF]Let configuration be configuration; Let programming be programming

Nowadays, programming is different than before. Programming is no long programming but configuration. Particularly, when we are using Managed code, c# /Java. Many codes are just configuration codes! That is not fun and boring and the code is hard to remember. let configuration be configuration, wri... [More]

[VS2010]Visual Studio 2010 Productivity Power Tools

Visual Studio 2010 Productivity Power Tools - an awesome VS2010 extension, install it to make VS2010 super. From now on, I can post code by just copying from VS2010 directly to Word 2010 and publish blog entries to my Blog host. Here is a sample code :     public class Sim... [More]

[DotNet]DotNet Asynchronous Programming Pattern

Delegate BeginInvoke and EndInvoke methods are the fundatmental of c# asynchronous programming. here is a example:     public class AsyncResultPatternIntroduction {         delegate void WorkerThreadHandler();       &... [More]

[DotNet]让开发变得简单一点- Visual Studio 2010几个让人印象深刻的新功能

引言 "我们的目标,不仅仅是做出几个新功能,而是要回答一个问题:'如何让现在的开发人员生活更容易一些'"---Scott Guthrie, ASP.NET 之父, 微软副总裁。 因为学习WF4的缘故,早在去年,我很不情愿得在我的笔记本上安装了Visual Studio 2010 beta1, 一个字,慢,是无法忍受的慢,还没怎么用就已经卸载。beta 2版本有了很多很大的改进,但仍旧非常不好用。那时记得和VS2010 测试组的朋友打羽毛球的时候,我半开玩笑的问他们,这么大的bug 你们都没测出来,还打不打算让我们用VS2010!还记得一件事,我遇到一个WF4 设计器的bug, 于是... [More]

[WF4;DotNet]Use TypeConverter

TypeConverter will be used in WF4. this sample demonstrate how to use TypeConverter in imperative code. Main Program: Person Class: Converter: Result: For more info about TypeConverter and TypeDescriptor please check these links: http://msdn.microsoft.com/en-us/library/system.componentmodel.... [More]

[.NET,C#]How to Kill a Windows Process by code

here is a sample code: using System.Diagnostics;class FindAndKillProcess { public bool findAndKillProcess(string pid) { Process[] processes = Process.GetProcesses(); foreach (Process clsProcess in processes) { if (clsProcess.Id.ToString().Equals(pid)) { cl... [More]