Example #1
0
        private static void DemoStruct()
        {
            var movie1 = new MovieStruct(
                "Star Wars: Episode I – The Phantom Menace",
                "George Lucas",
                "Rick McCallum",
                new DateTime(1999, 5, 15));

            var movie2 = new MovieStruct(
                "Star Wars: Episode I – The Phantom Menace",
                "George Lucas",
                "Rick McCallum",
                new DateTime(1999, 5, 15));

            Console.WriteLine(movie1);
            Console.WriteLine(movie1.Equals(movie2));
            // Does not compile
            //Console.WriteLine(movie1 == movie2);

            SetDescription(movie1);
            Console.WriteLine(movie1.Description);
        }
Example #2
0
 private static void SetDescription(MovieStruct movie)
 {
     movie.Description = "Good movie";
 }