添加静态数据成员

[1]

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace JQuery.Model
{
 public class Member
 {
        public string name { get; set; }
        public string txtbody { get; set; }
 }
}

 

[2]

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace JQuery.Model
{
    public class Members
    {
        List<Member> members = new List<Member>()
        {
            new Member(){name="天外飞仙",txtbody="不清楚"},
            new Member(){name="GOD",txtbody="Sad"}
        };
    }
}

posted @ 2011-10-20 10:54  笑醉红尘  阅读(214)  评论(0编辑  收藏  举报