December 2018
Beginner to intermediate
668 pages
15h 30m
English
In either Visual Studio 2017 or Visual Studio Code, add statements to the Person class, as shown in the following code:
using System; using System.Collections.Generic; using static System.Console; namespace Packt.CS7 { public partial class Person { // fields public string Name; public DateTime DateOfBirth; public List<Person> Children = new List<Person>(); // methods public void WriteToConsole() { WriteLine($"{Name} was born on {DateOfBirth:dddd, d MMMM yyyy}"); } } }
Read now
Unlock full access