Last active
August 29, 2015 14:06
-
-
Save ThomasArdal/d0ca2ae13f340abc198c to your computer and use it in GitHub Desktop.
Movie class with multiple constructors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Movie(string title, List<string> genres) | |
{ | |
public string Title { get; } = title; | |
public List<string> Genres { get; } = genres; | |
public int Runtime { get; private set; } | |
public Movie(string title, List<string> genres, int runtime) : this(title, genres) | |
{ | |
Runtime = runtime; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment