movie.cs

来自「C.net写的影院售票系统」· CS 代码 · 共 81 行

CS
81
字号
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;

namespace MyCinema
{
    public enum MovieType
    {
        //喜剧
        Comedy,
        //战争
        War,
        //爱情
        Romance,
        //动作
        Action,
        //卡通
        Cartoon,
        //恐怖
        Thriller
    }

    [Serializable]
    public class Movie
    {
        public Movie() { }
        public Movie(string movieName, string poster, string director,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; }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?