?? functioninfocollection.cs
字號:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace ProgramCalculator
{
/// <summary>
/// 用于保存FunctionInfo對象的集合
/// </summary>
public class FunctionInfoCollection:ICollection
{
private ArrayList alCollection = new ArrayList();
public FunctionInfoCollection()
{
}
/// <summary>
/// 索引器
/// </summary>
/// <param name="index">索引號</param>
/// <returns></returns>
public FunctionInfo this[int index]
{
get
{
return (FunctionInfo) this.alCollection[index];
}
set
{
this.alCollection[index] = value;
}
}
/// <summary>
/// 添加元素到集合
/// </summary>
/// <param name="fInfo">要添加的FunctionInfo對象</param>
public int Add(FunctionInfo fInfo)
{
return this.alCollection.Add(fInfo);
}
/// <summary>
/// 從集合移出特定元素的第一個匹配項
/// </summary>
/// <param name="fInfo"></param>
public void Remove(FunctionInfo fInfo)
{
this.alCollection.Remove(fInfo);
}
#region ICollection 成員
public void CopyTo(Array array, int index)
{
this.alCollection.CopyTo(array, index);
}
public int Count
{
get { return this.alCollection.Count; }
}
public bool IsSynchronized
{
get { return false; }
}
public object SyncRoot
{
get { return this; }
}
#endregion
#region IEnumerable 成員
public IEnumerator GetEnumerator()
{
return this.alCollection.GetEnumerator();
}
#endregion
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -