예제 #1
0
 public void PrintYear(President p) => Console.WriteLine(p.Year.ToString());
예제 #2
0
 public void PrintParty(President p) => Console.WriteLine(p.Party);
예제 #3
0
 public void PrintState(President p) => Console.WriteLine(p.State);
예제 #4
0
 public void PrintLastName(President p) => Console.WriteLine(p.LastName);
예제 #5
0
 public void PrintString(President p) =>
 Console.WriteLine($"{FirstName} {LastName} from {State} was a {Party} elected in {Year}.");
예제 #6
0
파일: Program.cs 프로젝트: dmlicona/ISTA421
 //print takes a President argument and returns void
 public void PrintFirstName(President p) => Console.WriteLine(p.FirstName); // Expression, body, method