Initial commit

This commit is contained in:
Mark J Price 2022-02-27 19:08:52 +00:00
parent bc96ccb183
commit 18f89e91d4
62 changed files with 1661 additions and 2 deletions

View file

@ -0,0 +1,19 @@
using Packt.Shared;
partial class Program
{
static void OutputPeopleNames(IEnumerable<Person?> people, string title)
{
WriteLine(title);
foreach (Person? p in people)
{
WriteLine(" {0}",
p is null ? "<null> Person" : p.Name ?? "<null> Name");
/* if p is null then output: <null> Person
else output: p.Name
unless p.Name is null in which case output: <null> Name */
}
}
}