????????????????????????????????????
namespace MyInface
{
//????????????y????á?
//?????????????á?
public interface IBookList
{
void Add(string BookName);
void Append(string BookName);
void Remove(int position);
int Count { get;}
string this[int index] { get;set;}
}
//???????
public class BookList : IBookList
{
private List<string> booklist = new List<string>();
#region IBookList ???
public void Add(string BookName)
{
booklist.Add(BookName);
}
public void Append(string BookName)
{
booklist.Insert(booklist.Count?? BookName);
}
public void Remove(int position)
{
booklist.RemoveAt(position);
}
public int Count
{
get
{
return booklist.Count;
}
}
public string this[int index]
{
get
{
return booklist[index];
}
set
{
booklist[index] = value;
}
}
#endregion
}