?? movie.cs
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -