⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 movie.cs

📁 青鸟影院
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;

namespace GreenBirdCinema
{
    /// <summary>
    /// 电影类
    /// </summary>
    /// 
    [Serializable]
    public class Movie
    {
        //添加两个有参的和无参的构造函数
        public Movie() 
        {
            movieType = new MovieType();
        }
        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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -