继承自List<>,实现ICloneable、IList<>、IList接口
/**/
/// <summary>
/// 用于装载数据集合的泛型类
/// </summary>
/// <typeparam name="数据类型">装载数据的类型</typeparam>
[Serializable]
public
class
数据列表
<
数据类型
>
: List
<
数据类型
>
, ICloneable, IList
<
数据类型
>
,IList

...
{

/**//// <summary>
/// 默认构造函数
/// </summary>
public 数据列表()
: base()

...{

}


/**//// <summary>
/// 构造时添加一个集合到列表中
/// </summary>
/// <param name="collection">一个集合,其元素被复制到新列表中。</param>
public 数据列表(IEnumerable<数据类型> collection)
: base(collection)

...{

}


/**//// <summary>
/// 构造时设定列表数据在改变前的容纳长度
/// </summary>
/// <param name="capaciti">长度</param>
public 数据列表(int capaciti)
: base(capaciti)

...{
}


/**//// <summary>
/// XML序列化此对象
/// </summary>
public void 使用XML序列化对象(string 路径)

...{
CoreFunction.输入输出.XML序列化对象<数据列表<数据类型>>(this, 路径);
}


/**//// <summary>
/// XML反序列化指定对象
/// </summary>
public static 数据列表<数据类型> 使用XML反序列化对象(string 路径)

...{
return CoreFunction.输入输出.XML反序列化对象<数据列表<数据类型>>(路径);
}


/**//// <summary>
/// 二进制序列化此对象
/// </summary>
public void 使用二进制序列化对象(string 路径)

...{
CoreFunction.输入输出.序列化对象(this, 路径);
}


/**//// <summary>
/// 二进制反序列化指定对象
/// </summary>
public static 数据列表<数据类型> 使用二进制反序列化对象(string 路径)

...{
return (数据列表<数据类型>)CoreFunction.输入输出.反序列化对象(路径);
}


ICloneable 成员#region ICloneable 成员


/**//// <summary>
/// 创建作为当前实例副本的新对象
/// </summary>
/// <returns>作为此实例副本的新对象</returns>
public object Clone()

...{
string FileName = CoreFunction.变量.程序所在目录路径 + "/" + DateTime.Now.ToFileTime() + "" + DateTime.Now.GetHashCode() + "" + this.GetHashCode();
this.使用二进制序列化对象(FileName);
object o = 使用二进制反序列化对象(FileName);
File.Delete(FileName);
return o;
}

#endregion


/**//// <summary>
/// 重写ToString方法
/// </summary>
public override string ToString()

...{
StringBuilder S = new StringBuilder();
foreach (数据类型 f in this)

...{
S.AppendLine(f.ToString());
}
return S.ToString();
}


IList<数据类型> 成员#region IList<数据类型> 成员

int IList<数据类型>.IndexOf(数据类型 item)

...{
return IndexOf(item);
}

void IList<数据类型>.Insert(int index, 数据类型 item)

...{
Insert(index, item);
}

void IList<数据类型>.RemoveAt(int index)

...{
RemoveAt(index);
}

数据类型 IList<数据类型>.this[int index]

...{
get

...{
return this[index];
}
set

...{
this[index] = value;
}
}

#endregion


ICollection<数据类型> 成员#region ICollection<数据类型> 成员

void ICollection<数据类型>.Add(数据类型 item)

...{
Add(item);
}

void ICollection<数据类型>.Clear()

...{
Clear();
}

bool ICollection<数据类型>.Contains(数据类型 item)

...{
return Contains(item);
}

void ICollection<数据类型>.CopyTo(数据类型[] array, int arrayIndex)

...{
CopyTo(array, arrayIndex);
}

int ICollection<数据类型>.Count

...{

get ...{ return Count; }
}

bool ICollection<数据类型>.IsReadOnly

...{

get ...{ return false; }
}

bool ICollection<数据类型>.Remove(数据类型 item)

...{
return Remove(item);
}

#endregion


IEnumerable<数据类型> 成员#region IEnumerable<数据类型> 成员

IEnumerator<数据类型> IEnumerable<数据类型>.GetEnumerator()

...{
foreach(数据类型 f in this)

...{
yield return f;
}
}

#endregion


IEnumerable 成员#region IEnumerable 成员

IEnumerator IEnumerable.GetEnumerator()

...{
foreach (数据类型 f in this)

...{
yield return f;
}
}

#endregion


IList 成员#region IList 成员

int IList.Add(object value)

...{
return ((IList)this).Add((数据类型)value);
}

void IList.Clear()

...{
Clear();
}

bool IList.Contains(object value)

...{
return Contains((数据类型)value);
}

int IList.IndexOf(object value)

...{
return IndexOf((数据类型)value);
}

void IList.Insert(int index, object value)

...{
Insert(index, (数据类型)value);
}

bool IList.IsFixedSize

...{

get ...{ return ((IList)this).IsFixedSize; }
}

bool IList.IsReadOnly

...{

get ...{ return ((IList)this).IsReadOnly; }
}

void IList.Remove(object value)

...{
Remove((数据类型)value);
}

void IList.RemoveAt(int index)

...{
RemoveAt(index);
}

object IList.this[int index]

...{
get

...{
return this[index];
}
set

...{
this[index] = (数据类型)value;
}
}

#endregion


ICollection 成员#region ICollection 成员

void ICollection.CopyTo(Array array, int index)

...{
((IList)this).CopyTo(array, index);
}

int ICollection.Count

...{

get ...{ return Count; }
}

bool ICollection.IsSynchronized

...{

get ...{ return ((IList)this).IsSynchronized; }
}

object ICollection.SyncRoot

...{

get ...{ return ((IList)this).SyncRoot; }
}

#endregion
}