04 2014 档案

摘要:Server Side Code:class Program { static void Main(string[] args) { TcpListener tcpListener = new TcpListener(IPAddress.Loo... 阅读全文
posted @ 2014-04-14 08:50 cnbwang 阅读(108) 评论(0) 推荐(0)
摘要:class BridgePattern { public static void Main() { IReport reportMonthly = new MonthlyReport(); IReport reportYearly = new YearlyReport(); ReportChart reportChart = new ColumnReportChart(); reportChart.SetReport(reportMonthly); ... 阅读全文
posted @ 2014-04-12 15:03 cnbwang 阅读(205) 评论(0) 推荐(0)
摘要:/// /// using this pattern, the concrete element such as Family or Team is supposed to be stable, /// and the count of the total elements should be stable as well. /// Concrete visitor such as CompeteNotice or FeeCharge, may be extendable. For instance, we /// can add a GroupPrinca... 阅读全文
posted @ 2014-04-12 09:45 cnbwang 阅读(259) 评论(0) 推荐(0)
摘要:Introduce a questionConsider the follow code snippet: 1 class Program 2 { 3 static int _hours = 0; 4 5 static void Main(string[] args) 6 { 7 var tasks = new Task[2]; 8 for (int i = 0; i < tasks.Length; i++) 9 {10 tasks[... 阅读全文
posted @ 2014-04-08 12:29 cnbwang 阅读(257) 评论(0) 推荐(0)