惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
L
LangChain Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
腾讯CDC
GbyAI
GbyAI
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
F
Fortinet All Blogs
Y
Y Combinator Blog
V
V2EX
A
About on SuperTechFans

博客园 - 左佩玉

通过了 70-316 考试 .NET SDK 工具 线程 进程 程序配置 程序集 全局化和本地化 实现帮助 可访问性设计 访问和调用外部组件 实现打印 自定义控件 使用 GDI+ 在ADO.net 中使用xml 绑定、查看和筛选数据 ADO.net 处理和抛出异常 使用Debug和Trace 测试和调试
继承 System.Collections.CollectionBase 创建一个强类型集合类
左佩玉 · 2005-08-21 · via 博客园 - 左佩玉

using System;

namespace Joe_s_Doughnut_Shop_CSharp
{
    
/// <summary>
    
/// Summary description for DoughnutCollection.
    
/// </summary>

    public class DoughnutCollection : System.Collections.CollectionBase
    
{
        
public DoughnutCollection()
        
{
            
//
            
// TODO: Add constructor logic here
            
//
        }
          //添加对象
        
public void Add(DoughnutMachine.Doughnut aDoughnut)
        
{
            List.Add(aDoughnut);
        }
          //索引器
        
public DoughnutMachine.Doughnut this[int index]
        
{
            
get
            
{
                
return (DoughnutMachine.Doughnut)List[index];
            }

        }
        //移除对象
        
public void Remove(DoughnutMachine.Doughnut aDoughnut)
        
{
            
if (List.Contains(aDoughnut) == true)
            
{
                List.Remove(aDoughnut);
            }

        }

    }

}