您目前尚未登陆,请选择【登陆】或【注册
首页->新闻文章->多层文章管理系统源码>>Model/ArticleCollection.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:多层文章管理系统源码
当前文件:文件类型 MultiLayerArticle/Model/ArticleCollection.cs打开代码结构图
普通视图
		            
1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.Collections; 5 6namespace Model 7{ 8 public class ArticleCollection : CollectionBase 9 { 10 private int articleCount; 11 /// <summary> 12 /// 文章数量 13 /// </summary> 14 public int ArticleCount 15 { 16 get { return articleCount; } 17 set { articleCount = value; } 18 } 19 20 public ArticleModel this[int index] 21 { 22 set { List[index] = value; } 23 get { return (ArticleModel)List[index]; } 24 } 25 26 public void Add(ArticleModel article) 27 { 28 List.Add(article); 29 } 30 31 public ArticleModel GetArticleModelByArticleID(int articleID) 32 { 33 ArticleModel article = new ArticleModel(); 34 foreach (ArticleModel am in List) 35 { 36 if (am.ArticleID == articleID) 37 { 38 article = am; 39 } 40 } 41 return article; 42 } 43 } 44} 45
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:多层文章管理系统源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号