随笔分类 -  C#2.0

摘要:很简单的一个问题。 阅读全文
posted @ 2008-05-22 18:08 roboth 阅读(457) 评论(2) 推荐(0)
摘要:观察美丽少妇的后果 阅读全文
posted @ 2008-05-22 12:14 roboth 阅读(527) 评论(0) 推荐(0)
摘要:using内幕。 阅读全文
posted @ 2008-05-09 10:52 roboth 阅读(373) 评论(3) 推荐(0)
摘要:readonly vs. const [C#] Written by Allen Lee 阅读全文
posted @ 2008-04-08 15:56 roboth 阅读(162) 评论(0) 推荐(0)
摘要:using System; using System.Collections; using System.Collections.Generic; public class Stack : IEnumerable { //数组,索引 T[] items; int idx; public Stack() { idx = 0; i... 阅读全文
posted @ 2008-04-06 21:47 roboth 阅读(289) 评论(2) 推荐(0)
摘要:using SC = System; using System; class Program { [Obsolete] static void Foo() { SC::Console.WriteLine("Obsolete method"); } static void Main() { #pragma warning... 阅读全文
posted @ 2008-01-17 16:39 roboth 阅读(293) 评论(1) 推荐(0)
摘要:妓女也玩OCP 阅读全文
posted @ 2007-11-23 11:54 roboth 阅读(760) 评论(5) 推荐(0)
摘要:开放封闭原则 阅读全文
posted @ 2007-11-22 18:22 roboth 阅读(636) 评论(0) 推荐(0)
摘要:摘自TerryLee's Blog URL:http://www.cnblogs.com/Terrylee/archive/2006/09/16/Iterator_Pattern.html 阅读全文
posted @ 2007-11-20 12:20 roboth 阅读(384) 评论(1) 推荐(0)
摘要:Converting ArrayList to Array / Array to ArrayList C# 阅读全文
posted @ 2007-09-29 16:58 roboth 阅读(646) 评论(0) 推荐(0)
摘要:应一个初学者的要求,简单写了几句。 阅读全文
posted @ 2007-09-18 15:35 roboth 阅读(307) 评论(2) 推荐(0)
摘要:Polymorphism! 阅读全文
posted @ 2007-08-27 19:28 roboth 阅读(186) 评论(0) 推荐(0)
摘要:在C#中有两种类型的数据,一种是值类型数据,一种是引用类型数据。在编码的时候区分这两种类型数据,可以避免一些细小的编码错误。 首先说说什么类型是值类型,例如:int、float、bool之类的基础类型,以及用struct定义的类型,如:DateTime。除此外,如string,数组,以及用class定义的类型等都是引用类型。对于C#来说,很难罗列出所有类型进行一一分别,这需要自己在编码过程... 阅读全文
posted @ 2007-08-22 00:44 roboth 阅读(315) 评论(0) 推荐(0)
摘要:下面的这篇文章讲的十分透彻了,所以转载之 abstract class和interface是Java语言中对于抽象类定义进行支持的两种机制,正是由于这两种机制的存在,才赋予了Java强大的面向对象能力。abstract class和interface之间在对于抽象类定义的支持方面具有很大的相似性,甚至可以相互替换,因此很多开发者在进行抽象类定义时对于abstract class和interface... 阅读全文
posted @ 2007-08-21 23:54 roboth 阅读(260) 评论(0) 推荐(0)
摘要:/**/////// Exception Sample///namespace ExceptionSample{ using System; class EntryPoint { static void Main() { string userInput; while (true) { ... 阅读全文
posted @ 2007-04-27 21:06 roboth 阅读(480) 评论(0) 推荐(0)
摘要:using System;using System.Collections;namespace _08_04{ public class Class_08_04 { public static void Main(String[] args) { Stack s = new Stack(); s.Push("Cat... 阅读全文
posted @ 2007-04-27 15:08 roboth 阅读(248) 评论(0) 推荐(0)