認識C#2.0的新功能

認識C#2.0的新功能

認識C#2.0的新功能

資策會數位教育研究所講師曹山

 

 

Introduction

C#2.0可以用泛型,遞迭器,部份型態,不具名方法來建立更易軟體再用,更高效能,暨更容易維護的程式。s
泛型
為什麼要使用 泛型 ?

設計一些集合型態來做為收集特定型態的資訊往往面臨:為了要能收集不同型態的資訊則要為每一種要收集的型態創造一個集合型態的類別。例如:

Automated Unit Tests for Legacy Code with Pex

Generation Test: Automated Unit Tests for Legacy Code with Pex

Automated Unit Tests for Legacy Code with Pex
Nikhil Sachdeva

Download the Code Sample

In my previous life I was a consultant. One of my clients, a leading bank, wanted to automate its loan origination process. The bank already had a system in place that included a Windows-based application, a proprietary back end and a mainframe system that was also the heart of their solution. My job was to integrate the existing systems with a set of applications being developed for the accounts division.

The client had built a Web service that communicated with the mainframe. At first it seemed pretty simple. All I had to do was to hook into the service, get the information and pass it to the new accounts application. But it’s never that simple.

During implementation I found that the new systems expected a Loan Originator attribute, but the Web service GetLoanDetails method did not return that information. It turns out that the service was created years ago by a developer who’s no longer with the company. The bank has been using the service without any modifications because it has many layers and everyone is afraid of breaking something.

That Web service is legacy code.

Eventually, we built a lightweight service wrapper so the new systems could call it for any new information and continue using the old service as well. It would have been much easier to modify the existing service if a consistent and testable design had been followed.

淺析.Net下的多線程編程

淺析.Net下的多線程編程 – ASP+SQL,ASP.net – 程式設計 – 頂客論壇 – 台灣forum,Taiwan論壇bbs

析.Net下的多線程編程

多線程是許多操作系統所具有的特性,它能大大提高程序的運行效率,所以多線程編程技術為編程者廣泛關注。目前微軟的.Net戰略正進一步推進,各種相關的技術正為廣大編程者所接受,同樣在.Net中多線程編程技術具有相當重要的地位。本文我就向大家介紹在.Net下進行多線程編程的基本方法和步驟。