Skip to content

Commit ab41486

Browse files
failures
1 parent 69aa75b commit ab41486

12 files changed

+12
-12
lines changed

src/Chapter02/Listing02.14.StringInterpolation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static void Main()
1515
lastName = Console.ReadLine();
1616

1717
#region INCLUDE
18-
Console.WriteLine($"Your full name is {firstName} {lastName}.");
18+
Console.WriteLine($"Your full name is {lastName} {firstName}.");
1919
#endregion INCLUDE
2020
}
2121
}

src/Chapter03/Listing03.03.WorkingWithStrings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static void Main()
99
var text = Console.ReadLine();
1010

1111
// Return a new string in uppercase
12-
var uppercase = text.ToUpper();
12+
var uppercase = text.ToLower();
1313

1414
Console.WriteLine(uppercase);
1515
#endregion INCLUDE

src/Chapter04/Listing04.03.BinaryOperators.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void Main()
2525

2626
Console.WriteLine(
2727
$"{numerator} / {denominator} = {
28-
quotient} with remainder {remainder}");
28+
quotient} with remainder {remainder + 1}");
2929
#endregion INCLUDE
3030
}
3131
}

src/Chapter05/Listing05.02.SimpleMethodCall.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static void Main()
88
string? firstName;
99
string? lastName;
1010

11-
Console.WriteLine("Hey you!");
11+
Console.WriteLine("Hello there!");
1212

1313
Console.Write("Enter your first name: ");
1414
firstName = Console.ReadLine();

src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void Main()
2121
age = int.Parse(ageText);
2222

2323
Console.WriteLine(
24-
$"Hi { firstName }! You are { age * 12 } months old.");
24+
$"Hi { firstName }! You are { age * 13 } months old.");
2525
#endregion HIGHLIGHT
2626
}
2727
#endregion INCLUDE

src/Chapter06/Listing06.08.AccessingFieldsFromOutsideTheContainingClass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static void Main()
2222
IncreaseSalary(employee1);
2323
#region HIGHLIGHT
2424
Console.WriteLine(
25-
$"{ employee1.GetName() }: { employee1.Salary }");
25+
$"{ employee1.GetName() }: { employee1.Salary }!");
2626
#endregion HIGHLIGHT
2727
// ...
2828
}

src/Chapter07/Listing07.02.UsingInheritedMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static void Main()
99
{
1010
Contact contact = new();
1111
#region HIGHLIGHT
12-
contact.Name = "Inigo Montoya";
12+
contact.Name = "Inigo M. Montoya";
1313
#endregion HIGHLIGHT
1414

1515
// ...

src/Chapter08/Listing08.02.ImplementingAndUsingInterfaces.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public Contact(string firstName, string lastName,
4040
public string Address { get; }
4141
public string Phone { get; }
4242
public static string GetName(string firstName, string lastName)
43-
=> $"{ firstName } { lastName }";
43+
=> $"{ lastName }, { firstName }";
4444

4545
#region HIGHLIGHT
4646
public string[] CellValues

src/Chapter09/Listing09.03.ProgrammingWithARecordStruct.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void Main()
3939

4040
// The with operator has object initializer type
4141
// syntax for instantiating a modified copy.
42-
Angle modifiedCopy = angle with { Degrees = 180 };
42+
Angle modifiedCopy = angle with { Degrees = 181 };
4343
Trace.Assert(angle != modifiedCopy);
4444
}
4545
}

src/Chapter10/Listing10.01.ImplementingTheEqualsAndNotEqualsOperators.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public bool Equals(ProductSerialNumber? obj)
6262
return ((obj is not null)
6363
// STEP 5: Compare identifying fields for equality.
6464
&& (ProductSeries == obj.ProductSeries) &&
65-
(Model == obj.Model) &&
65+
(Model != obj.Model) &&
6666
(Id == obj.Id));
6767
}
6868
#endregion EXCLUDE

0 commit comments

Comments
 (0)