Created
December 19, 2016 18:41
-
-
Save ellenia/6ac3b829249cd93137894ed24e7081ee to your computer and use it in GitHub Desktop.
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
namespace Library | |
{ | |
struct Book | |
{ | |
public int ID; | |
public string Title; | |
public string ISBN; | |
public DateTime ReleaseDate; | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Book book1; | |
book1.ID = 1; | |
book1.Title = "C# Series 1"; | |
book1.ISBN = "111"; | |
book1.ReleaseDate = DateTime.Now; | |
Book book2; | |
book2.ID = 2; | |
book2.Title = "C# Series 2"; | |
book2.ISBN = "222"; | |
book2.ReleaseDate = DateTime.Now; | |
Console.WriteLine("ID: {0} Title: {1} ISBN: {2} Release Date: {3}", book1.ID, book1.Title, book1.ISBN, book1.ReleaseDate); | |
Console.WriteLine("ID: {0} Title: {1} ISBN: {2} Release Date: {3}", book2.ID, book2.Title, book2.ISBN, book2.ReleaseDate); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment