www.pudn.com > sudoku.rar > PuzzleStateCollection.cs


//-------------------------------------------------------------------------- 
//  
//  Copyright (c) Microsoft Corporation.  All rights reserved.  
//  
//  File: PuzzleStateCollection.cs 
// 
//  Description: A collection of PuzzleState objects. 
//  
//-------------------------------------------------------------------------- 
 
using System; 
using System.Text; 
using System.Collections; 
 
namespace Microsoft.Sudoku.Collections 
{ 
	/// A collection of PuzzleState instances. 
	[Serializable] 
	public sealed class PuzzleStateCollection : CollectionBase 
	{ 
		/// Initializes the collection. 
		public PuzzleStateCollection() { } 
 
		/// Adds a state to the list. 
		/// The state to be added. 
		public void Add(PuzzleState state) { InnerList.Add(state); } 
 
		/// Adds a collection of states to this collection. 
		/// The collection to be added. 
		public void AddRange(PuzzleStateCollection stateList) { InnerList.AddRange(stateList); } 
 
		/// Gets a state in the list. 
		public PuzzleState this[int index] { get { return (PuzzleState)InnerList[index]; } } 
	} 
}