PostSharp - Automatically Implementing INotifyPropertyChanged

要用 PostSharp 自動實作 INotifyPropertyChanged,在安裝完 PostSharp 擴充套件後,我們可以在類別上直接按下右鍵,在彈出的滑鼠右鍵快顯選單中,選取 Implement INotifyPropertyChanged 選單選項。 ...

February 1, 2015 · 2 min · 616 words · Larry Nung

Visual Studio 2015 - Support for debugging lambda expressions

Visual Studio 2015 以前,無論是透過監看視窗還是快速監看視窗,在除錯時都無法針對 Lambda 語法進行偵錯,除錯上很不方便。 ...

January 28, 2015 · 1 min · 130 words · Larry Nung

C# 6.0 - Extension Add methods in collection initializers

C# 6.0 以前,集合類別可以像下面這樣透過 Collection Initializers 初始集合成員: ...

January 22, 2015 · 1 min · 378 words · Larry Nung

C# 6.0 - Parameterless constructors in structs

在 C# 6.0 以前,Struct 會自帶 Parameterless Constructors,且不允許我們自行實作,像是下面這樣的程式碼: ...

January 21, 2015 · 1 min · 382 words · Larry Nung

C# 6.0 - Index initializers

以往我們在撰寫 C#,有 Object Initializer 與 Collection Initializer 可輔助我們作初始的動作,雖然可以初始大多數的資料,但在 Index 與 Event 這邊卻無法直接初始。 ...

January 15, 2015 · 1 min · 494 words · Larry Nung

C# 6.0 - String interpolation

以往在做比較簡單的字串串接,我們可能會用 + 運算符號進行串接,或是用 String.Format 帶入 Pattern 與要串接的字串去處理,像是下面這樣: ...

January 15, 2015 · 1 min · 328 words · Larry Nung

LinkedIn - Customize public profile url

LinkedIn 在剛申請完,會配給你一個預設的 Public Profile Url,這個 Public Profile Url 會長得像下面這樣。 ...

January 13, 2015 · 1 min · 263 words · Larry Nung

ASP.NET MVC - Replacing MVC JavascriptSerializer with JSON.NET JsonSerializer

使用 ASP.NET MVC 或是 Web API 做 JSON 格式的回傳,只要將 Model 帶入去建構 JsonResult 物件回傳即可,像是下面這樣: ...

January 13, 2015 · 1 min · 484 words · Larry Nung

MediaWiki - Change Wiki Logo

要改變 MediaWiki 的 Logo,我們可以先開啟 LocalSetting.php 檔,查閱 $wgLogo 設定的檔案位置。 ...

January 11, 2015 · 1 min · 85 words · Larry Nung

Windows Azure - Enable MediaWiki File Upload

使用 Azure 架設 MediaWiki,若要啟動檔案上傳的功能,我們需要在建立 MediaWiki 時,將 Enable MediaWiki File Uplad 以及 Use Windows Azure Storage As File Backend 設定開啟,並設定 Windows Azure Storage Account Name 以及 Windows Azure Storage Account Key。 ...

January 11, 2015 · 1 min · 182 words · Larry Nung