Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Errata.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Zhou Jing | 23 | 1080 | Change "DWORD flProtect); // The type of memory allocati
Zhou Jing | 22 | 1065 - 1066 | Changed 'Thread' to 'Task' and "Application exiting" to "Application shutting down"
Zhou Jing | 4 | 161 | Fix `input < 9` to `input < 0` in Listing 4.24
Zhou Jing | 4 | 119 | Show inconsistent size multi-dimensional array in listing 3.16
Zhou Jing | 3 | 114 | Replace `second` with `third` in "// Retrieve third item from the end (Python)"
Zhou Jing | 3 | 114 | Replace `second` with `third` in "// Retrieve third item from the end (Python)"
Tyler Woody | 13 | 702 | Remove the `!` negation in `string.IsNullOrWhiteSpace(input)` in the while loop to properly allow looping
15 changes: 15 additions & 0 deletions src/Chapter13.Tests/Listing13.15.Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter13.Listing13_15.Tests;

[TestClass]
public class ProgramTests
{
[TestMethod]
public void MainTest()
Comment thread
BenjaminMichaelis marked this conversation as resolved.
{
const string expected = "<<ValidInput>>ValidInput";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main
);
}
}
5 changes: 3 additions & 2 deletions src/Chapter13/Listing13.15.ParameterlessStatementLambdas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ public static void Main()
{
input = Console.ReadLine();
}
while(!string.IsNullOrWhiteSpace(input));
while(string.IsNullOrWhiteSpace(input));
return input!;
};
//...
#endregion INCLUDE
getUserInput();
string input = getUserInput();
Console.WriteLine(input);
}
}