replyindex.cs

来自「CSDN助手.net 由于csdn论坛改版」· CS 代码 · 共 64 行

CS
64
字号
/// <Copyright>
/// This Program Written By Luyan(5drush)
/// 2002/4/23
/// Email:nluyan@163.net
/// QQ:5743345
/// </Copyright>
using System;
using System.Collections;

namespace CSDN
{
	/// <summary>
	/// Reply索引器
	/// </summary>
	public class ReplyIndex
	{

		private ArrayList replyIndex = new ArrayList();

		public ReplyIndex()
		{

		}

		public int Length
		{
			get
			{
				return replyIndex.Count;
			}
		}

		public Reply this[int index]
		{
			get
			{
				if(index > -1 && index < replyIndex.Count)
				{
					return (Reply)replyIndex[index];
				}
				else
				{
					throw new IndexOutOfRangeException();
				}
			}
			set
			{
				if(index > -1 && index < replyIndex.Count)
				{
					replyIndex[index] = value;
				}
				else if(index == replyIndex.Count)
				{
					replyIndex.Add(value);
				}
				else
				{
					throw new IndexOutOfRangeException();
				}
			}
		}
	}
}

⌨️ 快捷键说明

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