movie.cs
来自「影院售票系统,三层架构」· CS 代码 · 共 76 行
CS
76 行
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 + -
显示快捷键?