📄 bookcollection.cs
字号:
using System;
namespace ABetterLibrary
{
/// <summary>
/// Summary description for BookCollection.
/// </summary>
public class BookCollection : System.Collections.DictionaryBase
{
public BookCollection()
{
//
// TODO: Add constructor logic here
//
}
public void Add(Book book)
{
this.Dictionary.Add(book.Title,book);
}
public void Remove(string title)
{
this.Dictionary.Remove(title);
}
public Book this [string title ]
{
get
{
if (this.Dictionary.Contains(title))
{
return (Book)(this.Dictionary [title ]);
}
else
{
return null;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -