Skip to content

Commit

Permalink
Minor edit - Chapter 5&6 (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMichaelis authored Sep 2, 2023
1 parent 6484ede commit f9e8037
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Chapter05/Listing05.30.RethrowingAnException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void Main()
catch (FormatException exception)
{
Console.WriteLine(
"A FormateException was thrown");
"A FormatException was thrown");
}
#region INCLUDE
// ...
Expand Down
8 changes: 4 additions & 4 deletions src/Chapter06/Listing06.06.AccessingFields.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public static void Main()
employee1.Salary = "Too Little";
IncreaseSalary(employee1);
Console.WriteLine(
"{0} {1}: {2}",
employee1.FirstName,
employee1.LastName,
employee1.Salary);
$"{
employee1.FirstName } {
employee1.LastName }: {
employee1.Salary }");
#endregion HIGHLIGHT
// ...
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public required string Title
}
set
{
ArgumentException.ThrowIfNullOrEmpty(
value = value?.Trim()!);
ArgumentException.ThrowIfNullOrEmpty(value);
_Title = value;
}
}
Expand All @@ -56,8 +55,7 @@ public required string Isbn
}
set
{
ArgumentException.ThrowIfNullOrEmpty(
value = value?.Trim()!);
ArgumentException.ThrowIfNullOrEmpty(value);
_Isbn = value;
}
}
Expand Down

0 comments on commit f9e8037

Please sign in to comment.