今天第一次用ObjectBuilder來建立簡單對象,探索方法確實很簡單。[TestMethod] public void TestMethod1() { Builder builder = new Builder(); //Locator locator = new Locator(); //LifetimeContainer lContainer = new LifetimeContainer();
Recommended toolsVisual Studio ExpressFoxe Visual StudioIt provides intelligence prompt for the xsl key words to facilitate the work on the xsl.FoxeIt provides a tree-nodes like view on the xml document to facilitate the navigation on the
CodeProjectIntroductionI hate the null object reference error. It will decrease not only the quality but also the customer satisfaction. Entering the C# 3.0 times, the extended functions give us a powerful way to change our coding styles, including
Umbraco is the most powerful and flexible CMS I have ever seen so far. I just write this essay to demonstrate how to develop an Umbraco DataType for the folks who have basic Asp.net development knowledge.Here we go, outlines for the steps.Create an
在給函數傳值的時候,我們可以通過參數列表的方式,也可以通過定義一個結構的方式。在最近的工作中,我認為前一種方式更好。例如以下代碼://通過參數列表傳遞值public void Create(long param1, long param2,long param3){ ..}//通過結構傳遞值public sealed class ClassOjbect{ public long param1; public long param2; public long param3;}pub
學習Smart Client,免不了要碰到Dependency Inject。關於Dependency Inject,推薦閱讀 Martin Fowler的Dependency Inject。以前也不止一次地聽說過依賴注入,但是沒有專門花時間去研究,今天看完的第一個感受就是在玩地址遊戲。例如,我們在代碼中定義一個變數。ObjX x = new ObjX();x.DoSomething();這裡,我們獲得了一個x的地址,而這個地址直接指向ObjX的執行個體。而當前代碼的上下文就直接依賴於ObjX。