background image

  public string Topic
  {
  get { return _topic; }
  set { _topic = value; }
  }
  public string Content
  {
  get { return _content; }
  set { _content = value; }
  }
  public DateTime PostTime 
  {
  get { return _postTime; }
  set { _postTime = value; }
  }
}
}
然后我们写一个文章集合类

 ArticleCollection

代码如下
程序代码
CODE:
//ArticleCollection.cs
using System[color=#0000ff];
using System.Collections;
namespace News_Articles.Data
{
/// <summary>
/// 文章的集合类,继承于 ArrayList
/// </summary>
public class ArticleCollection : ArrayList
{
  public ArticleCollection() : base()
  {
  }
  public ArticleCollection(ICollection c) : base(c)
  {
  }
}