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

📄 myclasscollection.cs

📁 ajax的应用实例 是个很好的学习例子 对初学者用很打帮助
💻 CS
字号:
using System;
using System.Collections;
using AJAXDemo.Examples.Classes;

namespace AJAXDemo.Examples.Collections
{
	public class MyClassCollection : CollectionBase  
	{

		public MyClass this[ int index ]  
		{
			get  
			{
				return( (MyClass) List[index] );
			}
			set  
			{
				List[index] = value;
			}
		}

		public int Add( MyClass value )  
		{
			return( List.Add( value ) );
		}

		public int IndexOf( MyClass value )  
		{
			return( List.IndexOf( value ) );
		}

		public void Insert( int index, MyClass value )  
		{
			List.Insert( index, value );
		}

		public void Remove( MyClass value )  
		{
			List.Remove( value );
		}

		public bool Contains( MyClass value )  
		{
			// If value is not of type Int16, this will return false.
			return( List.Contains( value ) );
		}

		protected override void OnInsert( int index, Object value )  
		{
		}

		protected override void OnRemove( int index, Object value )  
		{
		}

		protected override void OnSet( int index, Object oldValue, Object newValue )  
		{
		}

		protected override void OnValidate( Object value )  
		{
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -