摘要:
c#所有的类型都继承自System.Object: 1>值类型继承自System.ValueType;namespace System{ // Summary: // Provides the base class for value types. [Serializable] [ComVisible(true)] public abstract class ValueType { // Summary: // Initializes a new instance of the System.ValueType c... 阅读全文
摘要:
用foreach遍历访问的对象需要实现 IEnumerable 接口或声明 GetEnumerator 方法的类型。先来看看IEnumerable接口:namespace System.Collections{ // Summary: // Exposes the enumerator, which supports a simple iteration over a non-generic // collection. [ComVisible(true)] [Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A"... 阅读全文