摘要: 1. Can I use typedefs in C#?No, C# has no direct equivalent of the C++ typedef. C# does allow an alias to be specified via the using keyword:but the alias only applies in the file in which it is decla... 阅读全文
posted @ 2010-05-20 12:07 能巴 阅读(329) 评论(0) 推荐(1) 编辑
摘要: List<Employee> or EmployeeList? In current versions of C#, to get a strongly-typed collection, you need to define a separate type for that collection. So if you want to expose a collection o... 阅读全文
posted @ 2010-05-20 12:04 能巴 阅读(217) 评论(0) 推荐(1) 编辑
摘要: 1. Duck Typing ("If it walks like a duck and quacks like a duck, it must be a duck.") [Refer to here]Duck typing allows an object to be passed in to a method that expects a certain type even if it do... 阅读全文
posted @ 2010-05-20 11:36 能巴 阅读(152) 评论(0) 推荐(1) 编辑