📄 ordercollection.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace HardwareDistributor.Business
{
public class OrderCollection : CollectionBase
{
/// <summary>
/// Collection indexer
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public Order this[int index]
{
get
{
return (Order)List[index];
}
set
{
List[index] = value;
}
}
/// <summary>
/// Adds an object to the collection
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public int Add(Order value)
{
return (List.Add(value));
}
/// <summary>
/// Returns the index of the passed-in object
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public int IndexOf(Order value)
{
return (List.IndexOf(value));
}
/// <summary>
/// Inserts an object into a specfic index of the collection
/// </summary>
/// <param name="index"></param>
/// <param name="value"></param>
public void Insert(int index, Order value)
{
List.Insert(index, value);
}
/// <summary>
/// Removes an object from the collection
/// </summary>
/// <param name="value"></param>
public void Remove(Order value)
{
List.Remove(value);
}
/// <summary>
/// Tells you if this collection
/// contains the passed-in object
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public bool Contains(Order value)
{
return (List.Contains(value));
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -