⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ordercollection.cs

📁 微软的行业应用解决方案实例!非常优秀的Windows Mobile开发案例
💻 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 + -