C#特性

using System;
using System.Runtime;
using System.ComponentModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UCTest
{
    class Student
    {  
        /// <summary>
        /// 学生姓名
        /// </summary>
        [Category("学生基本信息")]
        [Browsable(true)]
        [DisplayName("姓名")]
        [Description("学生姓名")]
        public string Name { get; set; }
        /// <summary>
        /// 学生年龄
        /// </summary>
        [Category("学生基本信息")]
        [Browsable(true)]
        [DisplayName("年龄")]
        [Description("表示该学生的年龄")]
        public int Age { get; set; }
        /// <summary>
        /// 所在班级的名称
        /// </summary>
        [Category("学生基本信息")]
        [Browsable(true)]
        [DisplayName("班级名称")]
        [Description("该学生所在的班级名称")]
        public string  ClassName { get; set; }

     

       
        public event HandledEventHandler Sleep = delegate { };

    
        public Student()
        {

        }
        public Student(string name,int age,string className)
        {
            this.Name = name;
            this.Age = age;
            this.ClassName = className;
        }
    }
}

posted @ 2013-05-14 19:33  Predator  阅读(137)  评论(0编辑  收藏  举报