コード例 #1
0
        static void Main(string[] args)
        {
            MusicTrack track = new MusicTrack(artist: "Rob Miles", title: "My Way", length: 120);

            PrintTrack(new MusicTrack(track));
            Console.WriteLine(track.Artist);
            Console.ReadKey();
        }
コード例 #2
0
 static void PrintTrack(MusicTrack track)
 {
     track.Artist = "Fred Bloggs";
 }
コード例 #3
0
 public MusicTrack(MusicTrack source)
 {
     Artist = source.Artist;
     Title  = source.Title;
     Length = source.Length;
 }