diff --git a/src/Chapter05.Tests/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.Tests.cs b/src/Chapter05.Tests/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.Tests.cs deleted file mode 100644 index 8058d13ce..000000000 --- a/src/Chapter05.Tests/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.Tests.cs +++ /dev/null @@ -1,14 +0,0 @@ - -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12.Tests; - -[TestClass] -public class ProgramTests -{ - - [TestMethod] - public void Main_UsingToAvoidFullyQualifying_MethodCalledAsExpected() - { - IntelliTect.TestTools.Console.ConsoleAssert.Expect( - Listing05_08.Tests.ProgramTests.Expected, Program.Main); - } -} diff --git a/src/Chapter05.Tests/Listing05.13.UsingStaticDirective.Tests.cs b/src/Chapter05.Tests/Listing05.12.UsingStaticDirective.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.13.UsingStaticDirective.Tests.cs rename to src/Chapter05.Tests/Listing05.12.UsingStaticDirective.Tests.cs index 8f3a50753..3d37d6700 100644 --- a/src/Chapter05.Tests/Listing05.13.UsingStaticDirective.Tests.cs +++ b/src/Chapter05.Tests/Listing05.12.UsingStaticDirective.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_13.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12.Tests; [TestClass] public class HeyYouTests diff --git a/src/Chapter05.Tests/Listing05.16.PassingCommandLineArgumentsToMain.Tests.cs b/src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs similarity index 99% rename from src/Chapter05.Tests/Listing05.16.PassingCommandLineArgumentsToMain.Tests.cs rename to src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs index 01a1b52bc..1e066e4f9 100644 --- a/src/Chapter05.Tests/Listing05.16.PassingCommandLineArgumentsToMain.Tests.cs +++ b/src/Chapter05.Tests/Listing05.15.PassingCommandLineArgumentsToMain.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_15.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.17.PassingVariablesByValue.Tests.cs b/src/Chapter05.Tests/Listing05.16.PassingVariablesByValue.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.17.PassingVariablesByValue.Tests.cs rename to src/Chapter05.Tests/Listing05.16.PassingVariablesByValue.Tests.cs index f12639c50..b0ff4684d 100644 --- a/src/Chapter05.Tests/Listing05.17.PassingVariablesByValue.Tests.cs +++ b/src/Chapter05.Tests/Listing05.16.PassingVariablesByValue.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.18.PassingVariablesByReference.Tests.cs b/src/Chapter05.Tests/Listing05.17.PassingVariablesByReference.Tests.cs similarity index 95% rename from src/Chapter05.Tests/Listing05.18.PassingVariablesByReference.Tests.cs rename to src/Chapter05.Tests/Listing05.17.PassingVariablesByReference.Tests.cs index 714ae14b1..17aab7438 100644 --- a/src/Chapter05.Tests/Listing05.18.PassingVariablesByReference.Tests.cs +++ b/src/Chapter05.Tests/Listing05.17.PassingVariablesByReference.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.19.PassingVariablesOutOnly.Tests.cs b/src/Chapter05.Tests/Listing05.18.PassingVariablesOutOnly.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.19.PassingVariablesOutOnly.Tests.cs rename to src/Chapter05.Tests/Listing05.18.PassingVariablesOutOnly.Tests.cs index eb1074ba1..9ff32b61c 100644 --- a/src/Chapter05.Tests/Listing05.19.PassingVariablesOutOnly.Tests.cs +++ b/src/Chapter05.Tests/Listing05.18.PassingVariablesOutOnly.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18.Tests; [TestClass] public class ConvertToPhoneNumberTests diff --git a/src/Chapter05.Tests/Listing05.20.ReturningAReference.Tests.cs b/src/Chapter05.Tests/Listing05.19.ReturningAReference.Tests.cs similarity index 95% rename from src/Chapter05.Tests/Listing05.20.ReturningAReference.Tests.cs rename to src/Chapter05.Tests/Listing05.19.ReturningAReference.Tests.cs index d74447617..8446a0a66 100644 --- a/src/Chapter05.Tests/Listing05.20.ReturningAReference.Tests.cs +++ b/src/Chapter05.Tests/Listing05.19.ReturningAReference.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.21.PassingAVariableParameterList.Tests.cs b/src/Chapter05.Tests/Listing05.20.PassingAVariableParameterList.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.21.PassingAVariableParameterList.Tests.cs rename to src/Chapter05.Tests/Listing05.20.PassingAVariableParameterList.Tests.cs index b40a9f384..a85ae877f 100644 --- a/src/Chapter05.Tests/Listing05.21.PassingAVariableParameterList.Tests.cs +++ b/src/Chapter05.Tests/Listing05.20.PassingAVariableParameterList.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.22.CountingLinesGivenADirectory.Tests.cs b/src/Chapter05.Tests/Listing05.21.CountingLinesGivenADirectory.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.22.CountingLinesGivenADirectory.Tests.cs rename to src/Chapter05.Tests/Listing05.21.CountingLinesGivenADirectory.Tests.cs index c2e671550..8976096a0 100644 --- a/src/Chapter05.Tests/Listing05.22.CountingLinesGivenADirectory.Tests.cs +++ b/src/Chapter05.Tests/Listing05.21.CountingLinesGivenADirectory.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.24.MethodsWithOptionalParameters.Tests.cs b/src/Chapter05.Tests/Listing05.22.CountingLinesUsingOverloading.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.24.MethodsWithOptionalParameters.Tests.cs rename to src/Chapter05.Tests/Listing05.22.CountingLinesUsingOverloading.Tests.cs index 703988c2d..af96b5b98 100644 --- a/src/Chapter05.Tests/Listing05.24.MethodsWithOptionalParameters.Tests.cs +++ b/src/Chapter05.Tests/Listing05.22.CountingLinesUsingOverloading.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.23.CountingLinesUsingOverloading.Tests.cs b/src/Chapter05.Tests/Listing05.23.MethodsWithOptionalParameters.Tests.cs similarity index 100% rename from src/Chapter05.Tests/Listing05.23.CountingLinesUsingOverloading.Tests.cs rename to src/Chapter05.Tests/Listing05.23.MethodsWithOptionalParameters.Tests.cs diff --git a/src/Chapter05.Tests/Listing05.25.Tests.cs b/src/Chapter05.Tests/Listing05.24.SpecifyingParametersByName.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.25.Tests.cs rename to src/Chapter05.Tests/Listing05.24.SpecifyingParametersByName.Tests.cs index 0b8ca53db..4a3637ac3 100644 --- a/src/Chapter05.Tests/Listing05.25.Tests.cs +++ b/src/Chapter05.Tests/Listing05.24.SpecifyingParametersByName.Tests.cs @@ -1,7 +1,7 @@ using IntelliTect.TestTools.Console; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24.Tests; [TestClass] public class SpecifyingParametersByNameTests diff --git a/src/Chapter05.Tests/Listing05.26.ConvertingAStringToAnInt.Tests.cs b/src/Chapter05.Tests/Listing05.25.ConvertingAStringToAnInt.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.26.ConvertingAStringToAnInt.Tests.cs rename to src/Chapter05.Tests/Listing05.25.ConvertingAStringToAnInt.Tests.cs index 9a5bc9a08..917017de9 100644 --- a/src/Chapter05.Tests/Listing05.26.ConvertingAStringToAnInt.Tests.cs +++ b/src/Chapter05.Tests/Listing05.25.ConvertingAStringToAnInt.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25.Tests; [TestClass] public class ExceptionHandlingTests diff --git a/src/Chapter05.Tests/Listing05.27.CatchingAnException.Tests.cs b/src/Chapter05.Tests/Listing05.26.CatchingAnException.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.27.CatchingAnException.Tests.cs rename to src/Chapter05.Tests/Listing05.26.CatchingAnException.Tests.cs index f4de3042e..b01067fce 100644 --- a/src/Chapter05.Tests/Listing05.27.CatchingAnException.Tests.cs +++ b/src/Chapter05.Tests/Listing05.26.CatchingAnException.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26.Tests; [TestClass] public class ExceptionHandlingTests diff --git a/src/Chapter05.Tests/Listing05.28.FinallyWithoutCatch.Tests.cs b/src/Chapter05.Tests/Listing05.27.FinallyWithoutCatch.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.28.FinallyWithoutCatch.Tests.cs rename to src/Chapter05.Tests/Listing05.27.FinallyWithoutCatch.Tests.cs index a0bd1fc28..b9793891d 100644 --- a/src/Chapter05.Tests/Listing05.28.FinallyWithoutCatch.Tests.cs +++ b/src/Chapter05.Tests/Listing05.27.FinallyWithoutCatch.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27.Tests; [TestClass] public class ExceptionHandlingTests diff --git a/src/Chapter05.Tests/Listing05.29.GeneralCatchBlocks.Tests.cs b/src/Chapter05.Tests/Listing05.28.GeneralCatchBlocks.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.29.GeneralCatchBlocks.Tests.cs rename to src/Chapter05.Tests/Listing05.28.GeneralCatchBlocks.Tests.cs index 015d3177d..5920baaac 100644 --- a/src/Chapter05.Tests/Listing05.29.GeneralCatchBlocks.Tests.cs +++ b/src/Chapter05.Tests/Listing05.28.GeneralCatchBlocks.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.30.ThrowingAnException.Tests.cs b/src/Chapter05.Tests/Listing05.29.ThrowingAnException.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.30.ThrowingAnException.Tests.cs rename to src/Chapter05.Tests/Listing05.29.ThrowingAnException.Tests.cs index ae938c6e3..bd6514a16 100644 --- a/src/Chapter05.Tests/Listing05.30.ThrowingAnException.Tests.cs +++ b/src/Chapter05.Tests/Listing05.29.ThrowingAnException.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29.Tests; [TestClass] public class ThrowingExceptionsTests diff --git a/src/Chapter05.Tests/Listing05.31.RethrowingAnException.Tests.cs b/src/Chapter05.Tests/Listing05.30.RethrowingAnException.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.31.RethrowingAnException.Tests.cs rename to src/Chapter05.Tests/Listing05.30.RethrowingAnException.Tests.cs index ef848d3fd..329d4e82a 100644 --- a/src/Chapter05.Tests/Listing05.31.RethrowingAnException.Tests.cs +++ b/src/Chapter05.Tests/Listing05.30.RethrowingAnException.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30.Tests; [TestClass] public class ThrowingExceptionsTests diff --git a/src/Chapter05.Tests/Listing05.32.ParameterValidationThrowingArgumentNullException.Tests.cs b/src/Chapter05.Tests/Listing05.31.ParameterValidationThrowingArgumentNullException.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.32.ParameterValidationThrowingArgumentNullException.Tests.cs rename to src/Chapter05.Tests/Listing05.31.ParameterValidationThrowingArgumentNullException.Tests.cs index 9d69f1f9a..592a74d7d 100644 --- a/src/Chapter05.Tests/Listing05.32.ParameterValidationThrowingArgumentNullException.Tests.cs +++ b/src/Chapter05.Tests/Listing05.31.ParameterValidationThrowingArgumentNullException.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.33.ParameterValidationWithArgumentNullException.ThrowIfNull.Tests.cs b/src/Chapter05.Tests/Listing05.32.ParameterValidationWithArgumentNullException.ThrowIfNull.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.33.ParameterValidationWithArgumentNullException.ThrowIfNull.Tests.cs rename to src/Chapter05.Tests/Listing05.32.ParameterValidationWithArgumentNullException.ThrowIfNull.Tests.cs index 47ab7792b..2fa88afb7 100644 --- a/src/Chapter05.Tests/Listing05.33.ParameterValidationWithArgumentNullException.ThrowIfNull.Tests.cs +++ b/src/Chapter05.Tests/Listing05.32.ParameterValidationWithArgumentNullException.ThrowIfNull.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.34.CustomParameterValidation.Tests.cs b/src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs similarity index 99% rename from src/Chapter05.Tests/Listing05.34.CustomParameterValidation.Tests.cs rename to src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs index 63a3de2ec..202931444 100644 --- a/src/Chapter05.Tests/Listing05.34.CustomParameterValidation.Tests.cs +++ b/src/Chapter05.Tests/Listing05.33.CustomParameterValidation.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.35.TryCatch.Tests.cs b/src/Chapter05.Tests/Listing05.34.TryCatch.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.35.TryCatch.Tests.cs rename to src/Chapter05.Tests/Listing05.34.TryCatch.Tests.cs index 5a81f3272..75691709e 100644 --- a/src/Chapter05.Tests/Listing05.35.TryCatch.Tests.cs +++ b/src/Chapter05.Tests/Listing05.34.TryCatch.Tests.cs @@ -1,5 +1,5 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_35.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34.Tests; [TestClass] public class LeveragingTryParseTests diff --git a/src/Chapter05/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs b/src/Chapter05/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs deleted file mode 100644 index 85d486e05..000000000 --- a/src/Chapter05/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Disabled because not attributes have not been covered -// and the attribute is not available in .NET 6.0. -#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute'. - -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12; - -#region INCLUDE -// The using directive imports all types from the -// specified namespace into the entire file -using System.Text.RegularExpressions; - -public class Program -{ - public static void Main() - { - #region EXCLUDE - const string firstName = "FirstName"; - const string initial = "Initial"; - const string lastName = "LastName"; - - // Explaining regular expressions is beyond the - // scope of this book. - // See https://www.regular-expressions.info/ for - // more information. - const string pattern = $""" - (?<{firstName}>\w+)\s+((?<{initial}>\w)\.\s+)?(?<{lastName}>\w+)\s* - """; - - Console.WriteLine( - "Enter your full name (e.g. Inigo T. Montoya): "); - string name = Console.ReadLine()!; - - #endregion EXCLUDE - #region HIGHLIGHT - // No need to qualify RegEx type with - // System.Text.RegularExpressions because - // of the using directive above - Match match = Regex.Match(name, pattern); - #endregion HIGHLIGHT - #region EXCLUDE - - if (match.Success) - { - Console.WriteLine( - $"{firstName}: {match.Groups[firstName]}"); - Console.WriteLine( - $"{initial}: {match.Groups[initial]}"); - Console.WriteLine( - $"{lastName}: {match.Groups[lastName]}"); - } - #endregion EXCLUDE - } -} -#endregion INCLUDE diff --git a/src/Chapter05/Listing05.13.UsingStaticDirective.cs b/src/Chapter05/Listing05.12.UsingStaticDirective.cs similarity index 98% rename from src/Chapter05/Listing05.13.UsingStaticDirective.cs rename to src/Chapter05/Listing05.12.UsingStaticDirective.cs index 7dfba3799..71c76dcc6 100644 --- a/src/Chapter05/Listing05.13.UsingStaticDirective.cs +++ b/src/Chapter05/Listing05.12.UsingStaticDirective.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_13; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12; #region INCLUDE using static System.Console; diff --git a/src/Chapter05/Listing05.14.DeclaringATypeAlias.cs b/src/Chapter05/Listing05.13.DeclaringATypeAlias.cs similarity index 98% rename from src/Chapter05/Listing05.14.DeclaringATypeAlias.cs rename to src/Chapter05/Listing05.13.DeclaringATypeAlias.cs index 3494eee24..ce24252d9 100644 --- a/src/Chapter05/Listing05.14.DeclaringATypeAlias.cs +++ b/src/Chapter05/Listing05.13.DeclaringATypeAlias.cs @@ -1,5 +1,5 @@ #pragma warning disable CS0168 // Variable is declared but never used -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_14; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_13; #region INCLUDE #region HIGHLIGHT diff --git a/src/Chapter05/Listing05.15.DeclaringATypeAliasWithTheSameName.cs b/src/Chapter05/Listing05.14.DeclaringATypeAliasWithTheSameName.cs similarity index 98% rename from src/Chapter05/Listing05.15.DeclaringATypeAliasWithTheSameName.cs rename to src/Chapter05/Listing05.14.DeclaringATypeAliasWithTheSameName.cs index 656e1f0fb..ad1b9953f 100644 --- a/src/Chapter05/Listing05.15.DeclaringATypeAliasWithTheSameName.cs +++ b/src/Chapter05/Listing05.14.DeclaringATypeAliasWithTheSameName.cs @@ -1,5 +1,5 @@ #pragma warning disable CS0168 // Variable is declared but never used -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_15; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_14; #region INCLUDE diff --git a/src/Chapter05/Listing05.16.PassingCommandLineArgumentsToMain.cs b/src/Chapter05/Listing05.15.PassingCommandLineArgumentsToMain.cs similarity index 99% rename from src/Chapter05/Listing05.16.PassingCommandLineArgumentsToMain.cs rename to src/Chapter05/Listing05.15.PassingCommandLineArgumentsToMain.cs index b5279c6d1..6fa3142a1 100644 --- a/src/Chapter05/Listing05.16.PassingCommandLineArgumentsToMain.cs +++ b/src/Chapter05/Listing05.15.PassingCommandLineArgumentsToMain.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_15; #region INCLUDE public class Program diff --git a/src/Chapter05/Listing05.17.PassingVariablesByValue.cs b/src/Chapter05/Listing05.16.PassingVariablesByValue.cs similarity index 98% rename from src/Chapter05/Listing05.17.PassingVariablesByValue.cs rename to src/Chapter05/Listing05.16.PassingVariablesByValue.cs index 00e1f2d97..d11d1e1c0 100644 --- a/src/Chapter05/Listing05.17.PassingVariablesByValue.cs +++ b/src/Chapter05/Listing05.16.PassingVariablesByValue.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16; using System; diff --git a/src/Chapter05/Listing05.18.PassingVariablesByReference.cs b/src/Chapter05/Listing05.17.PassingVariablesByReference.cs similarity index 98% rename from src/Chapter05/Listing05.18.PassingVariablesByReference.cs rename to src/Chapter05/Listing05.17.PassingVariablesByReference.cs index 47497d004..c0d485397 100644 --- a/src/Chapter05/Listing05.18.PassingVariablesByReference.cs +++ b/src/Chapter05/Listing05.17.PassingVariablesByReference.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17; #region INCLUDE public class Program diff --git a/src/Chapter05/Listing05.19.PassingVariablesOutOnly.cs b/src/Chapter05/Listing05.18.PassingVariablesOutOnly.cs similarity index 99% rename from src/Chapter05/Listing05.19.PassingVariablesOutOnly.cs rename to src/Chapter05/Listing05.18.PassingVariablesOutOnly.cs index 1584f82a8..a9ab420e6 100644 --- a/src/Chapter05/Listing05.19.PassingVariablesOutOnly.cs +++ b/src/Chapter05/Listing05.18.PassingVariablesOutOnly.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18; public class ConvertToPhoneNumber { diff --git a/src/Chapter05/Listing05.20.ReturningAReference.cs b/src/Chapter05/Listing05.19.ReturningAReference.cs similarity index 99% rename from src/Chapter05/Listing05.20.ReturningAReference.cs rename to src/Chapter05/Listing05.19.ReturningAReference.cs index 8e5d6f47c..5304bdd82 100644 --- a/src/Chapter05/Listing05.20.ReturningAReference.cs +++ b/src/Chapter05/Listing05.19.ReturningAReference.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19; using System; diff --git a/src/Chapter05/Listing05.21.PassingAVariableParameterList.cs b/src/Chapter05/Listing05.20.PassingAVariableParameterList.cs similarity index 99% rename from src/Chapter05/Listing05.21.PassingAVariableParameterList.cs rename to src/Chapter05/Listing05.20.PassingAVariableParameterList.cs index bc597d42d..86785a94e 100644 --- a/src/Chapter05/Listing05.21.PassingAVariableParameterList.cs +++ b/src/Chapter05/Listing05.20.PassingAVariableParameterList.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20; #region INCLUDE using System; diff --git a/src/Chapter05/Listing05.22.CountingLinesGivenADirectory.cs b/src/Chapter05/Listing05.21.CountingLinesGivenADirectory.cs similarity index 99% rename from src/Chapter05/Listing05.22.CountingLinesGivenADirectory.cs rename to src/Chapter05/Listing05.21.CountingLinesGivenADirectory.cs index 92709f4cb..ac34baa34 100644 --- a/src/Chapter05/Listing05.22.CountingLinesGivenADirectory.cs +++ b/src/Chapter05/Listing05.21.CountingLinesGivenADirectory.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21; #region INCLUDE using System.IO; diff --git a/src/Chapter05/Listing05.23.CountingLinesUsingOverloading.cs b/src/Chapter05/Listing05.22.CountingLinesUsingOverloading.cs similarity index 99% rename from src/Chapter05/Listing05.23.CountingLinesUsingOverloading.cs rename to src/Chapter05/Listing05.22.CountingLinesUsingOverloading.cs index 264dbdf91..22a50dabe 100644 --- a/src/Chapter05/Listing05.23.CountingLinesUsingOverloading.cs +++ b/src/Chapter05/Listing05.22.CountingLinesUsingOverloading.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_23; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22; #region INCLUDE public static class LineCounter diff --git a/src/Chapter05/Listing05.24.MethodsWithOptionalParameters.cs b/src/Chapter05/Listing05.23.MethodsWithOptionalParameters.cs similarity index 99% rename from src/Chapter05/Listing05.24.MethodsWithOptionalParameters.cs rename to src/Chapter05/Listing05.23.MethodsWithOptionalParameters.cs index 97dcd5319..ab6c8e7d7 100644 --- a/src/Chapter05/Listing05.24.MethodsWithOptionalParameters.cs +++ b/src/Chapter05/Listing05.23.MethodsWithOptionalParameters.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_23; #region INCLUDE public static class LineCounter diff --git a/src/Chapter05/Listing05.25.SpecifyingParametersByName.cs b/src/Chapter05/Listing05.24.SpecifyingParametersByName.cs similarity index 98% rename from src/Chapter05/Listing05.25.SpecifyingParametersByName.cs rename to src/Chapter05/Listing05.24.SpecifyingParametersByName.cs index 5b174a445..13973c21f 100644 --- a/src/Chapter05/Listing05.25.SpecifyingParametersByName.cs +++ b/src/Chapter05/Listing05.24.SpecifyingParametersByName.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24; public class SpecifyingParametersByName { diff --git a/src/Chapter05/Listing05.26.ConvertingAStringToAnInt.cs b/src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs similarity index 98% rename from src/Chapter05/Listing05.26.ConvertingAStringToAnInt.cs rename to src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs index 7f3c64b7c..31a63668f 100644 --- a/src/Chapter05/Listing05.26.ConvertingAStringToAnInt.cs +++ b/src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25; public class ExceptionHandling { diff --git a/src/Chapter05/Listing05.27.CatchingAnException.cs b/src/Chapter05/Listing05.26.CatchingAnException.cs similarity index 99% rename from src/Chapter05/Listing05.27.CatchingAnException.cs rename to src/Chapter05/Listing05.26.CatchingAnException.cs index c6c1dd802..108204919 100644 --- a/src/Chapter05/Listing05.27.CatchingAnException.cs +++ b/src/Chapter05/Listing05.26.CatchingAnException.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26; #region INCLUDE public class ExceptionHandling diff --git a/src/Chapter05/Listing05.28.FinallyWithoutCatch.cs b/src/Chapter05/Listing05.27.FinallyWithoutCatch.cs similarity index 98% rename from src/Chapter05/Listing05.28.FinallyWithoutCatch.cs rename to src/Chapter05/Listing05.27.FinallyWithoutCatch.cs index f2f45671a..9281bff0a 100644 --- a/src/Chapter05/Listing05.28.FinallyWithoutCatch.cs +++ b/src/Chapter05/Listing05.27.FinallyWithoutCatch.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27; #region INCLUDE using System; diff --git a/src/Chapter05/Listing05.29.GeneralCatchBlocks.cs b/src/Chapter05/Listing05.28.GeneralCatchBlocks.cs similarity index 99% rename from src/Chapter05/Listing05.29.GeneralCatchBlocks.cs rename to src/Chapter05/Listing05.28.GeneralCatchBlocks.cs index 116122c1c..9533ba627 100644 --- a/src/Chapter05/Listing05.29.GeneralCatchBlocks.cs +++ b/src/Chapter05/Listing05.28.GeneralCatchBlocks.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28; #pragma warning disable CS0168 // Variable is declared but never used #region INCLUDE diff --git a/src/Chapter05/Listing05.30.ThrowingAnException.cs b/src/Chapter05/Listing05.29.ThrowingAnException.cs similarity index 99% rename from src/Chapter05/Listing05.30.ThrowingAnException.cs rename to src/Chapter05/Listing05.29.ThrowingAnException.cs index e086e8f10..f5b319932 100644 --- a/src/Chapter05/Listing05.30.ThrowingAnException.cs +++ b/src/Chapter05/Listing05.29.ThrowingAnException.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1058 #pragma warning disable CS0168 // Variable is declared but never used #pragma warning disable CS0162 // Unreachable code detected -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29; public class ThrowingExceptions { diff --git a/src/Chapter05/Listing05.31.RethrowingAnException.cs b/src/Chapter05/Listing05.30.RethrowingAnException.cs similarity index 99% rename from src/Chapter05/Listing05.31.RethrowingAnException.cs rename to src/Chapter05/Listing05.30.RethrowingAnException.cs index 4b9741975..65bf53add 100644 --- a/src/Chapter05/Listing05.31.RethrowingAnException.cs +++ b/src/Chapter05/Listing05.30.RethrowingAnException.cs @@ -1,7 +1,7 @@ #pragma warning disable CS0162 // Unreachable code detected #pragma warning disable CS1058 // A previous catch clause already catches all exceptions #pragma warning disable CS0168 // Variable is declared but never used -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30; public class ThrowingExceptions { diff --git a/src/Chapter05/Listing05.32.ParameterValidationThrowingArgumentNullException.cs b/src/Chapter05/Listing05.31.ParameterValidationThrowingArgumentNullException.cs similarity index 98% rename from src/Chapter05/Listing05.32.ParameterValidationThrowingArgumentNullException.cs rename to src/Chapter05/Listing05.31.ParameterValidationThrowingArgumentNullException.cs index bbd16e77f..ab95bf269 100644 --- a/src/Chapter05/Listing05.32.ParameterValidationThrowingArgumentNullException.cs +++ b/src/Chapter05/Listing05.31.ParameterValidationThrowingArgumentNullException.cs @@ -1,5 +1,5 @@ #pragma warning disable IDE0059 // Unnecessary assignment of a value -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31; public class Program { diff --git a/src/Chapter05/Listing05.33.ParameterValidationWithArgumentNullException.ThrowIfNull.cs b/src/Chapter05/Listing05.32.ParameterValidationWithArgumentNullException.ThrowIfNull.cs similarity index 98% rename from src/Chapter05/Listing05.33.ParameterValidationWithArgumentNullException.ThrowIfNull.cs rename to src/Chapter05/Listing05.32.ParameterValidationWithArgumentNullException.ThrowIfNull.cs index cabed7bdb..668cc9c0c 100644 --- a/src/Chapter05/Listing05.33.ParameterValidationWithArgumentNullException.ThrowIfNull.cs +++ b/src/Chapter05/Listing05.32.ParameterValidationWithArgumentNullException.ThrowIfNull.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32; public class Program { diff --git a/src/Chapter05/Listing05.34.CustomParameterValidation.cs b/src/Chapter05/Listing05.33.CustomParameterValidation.cs similarity index 99% rename from src/Chapter05/Listing05.34.CustomParameterValidation.cs rename to src/Chapter05/Listing05.33.CustomParameterValidation.cs index 88aa85290..6c8ecf7ab 100644 --- a/src/Chapter05/Listing05.34.CustomParameterValidation.cs +++ b/src/Chapter05/Listing05.33.CustomParameterValidation.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33; #region INCLUDE public class Program diff --git a/src/Chapter05/Listing05.35.TryCatch.cs b/src/Chapter05/Listing05.34.TryCatch.cs similarity index 98% rename from src/Chapter05/Listing05.35.TryCatch.cs rename to src/Chapter05/Listing05.34.TryCatch.cs index f1e517fde..2479e707b 100644 --- a/src/Chapter05/Listing05.35.TryCatch.cs +++ b/src/Chapter05/Listing05.34.TryCatch.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_35; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34; public class LeveragingTryParse {