标题:定义枚举的时候是这样吗?
取消只看楼主
ganmaoaq
Rank: 2
等 级:论坛游民
帖 子:11
专家分:43
注 册:2009-8-17
结帖率:0
已结贴  问题点数:20 回复次数:0 
定义枚举的时候是这样吗?
using System;
using System.Collections.Generic;
using System.Text;

namespace Accp
{
    public enum MovieType
    {
        //喜剧
         Comedy,
        //战争
        War,
       // 爱情
            Romance,
        //动作
        Action,
        //卡通
        Cartoon,
        //恐怖
        Thriller
    }
    [Serializable]
   public class Movie
    {
       public Movie() { }
       public Movie(string moviename,string poster,http://www.,string actor,MovieType movietype ,int price)
       {
           this._movieName = moviename;
           this._poster = poster;
           this._director = director;
           this._actor = actor;
           this._movieType = movietype;
           this._price = price;

       }
       //电影名
        private string _movieName;
        public string MovieName
        {
            get { return _movieName; }
            set { _movieName = value; }
        }
       //海报图片
        private string _poster;
        public string Poster
        {
            get { return _poster; }
            set { _poster = value; }
        }
       //导演名
        private string _director;
        public string Director
        {
            get { return _director; }
            set { _director = value; }
        }
       //主演
        private string _actor;
        public string Actor
        {
            get { return _actor; }
            set { _actor = value; }
        }
       //电影类型
        private MovieType _movieType;
        public MovieType MovieType
        {
            get { return _movieType; }
            set { _movieType = value; }
        }
       //票价
        private int _price;

        public int Price
        {
            get { return _price; }
            set { _price = value; }
        }
      
    }
}

[ 本帖最后由 ganmaoaq 于 2009-8-17 07:39 编辑 ]
搜索更多相关主题的帖子: 枚举 定义 
2009-08-17 07:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-282954-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.232091 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved