diff --git a/src/Chapter05.Tests/Listing05.10.Tests.cs b/src/Chapter05.Tests/Listing05.08.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.10.Tests.cs rename to src/Chapter05.Tests/Listing05.08.Tests.cs index f860cb34b..54edb0020 100644 --- a/src/Chapter05.Tests/Listing05.10.Tests.cs +++ b/src/Chapter05.Tests/Listing05.08.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_10.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_08.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.09.StringBuilderImplicitUsingStatements.Tests.cs b/src/Chapter05.Tests/Listing05.10.StringBuilderImplicitUsingStatements.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.09.StringBuilderImplicitUsingStatements.Tests.cs rename to src/Chapter05.Tests/Listing05.10.StringBuilderImplicitUsingStatements.Tests.cs index 08bbf4860..b29167232 100644 --- a/src/Chapter05.Tests/Listing05.09.StringBuilderImplicitUsingStatements.Tests.cs +++ b/src/Chapter05.Tests/Listing05.10.StringBuilderImplicitUsingStatements.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_09.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_10.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.11.Tests.cs b/src/Chapter05.Tests/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.Tests.cs similarity index 80% rename from src/Chapter05.Tests/Listing05.11.Tests.cs rename to src/Chapter05.Tests/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.Tests.cs index 64a35d75a..d44260518 100644 --- a/src/Chapter05.Tests/Listing05.11.Tests.cs +++ b/src/Chapter05.Tests/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_11.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12.Tests; [TestClass] public class ProgramTests @@ -10,6 +10,6 @@ public class ProgramTests public void Main_UsingToAvoidFullyQualifying_MethodCalledAsExpected() { IntelliTect.TestTools.Console.ConsoleAssert.Expect( - Listing05_10.Tests.ProgramTests.Expected, Program.Main); + Listing05_08.Tests.ProgramTests.Expected, Program.Main); } } diff --git a/src/Chapter05.Tests/Listing05.12.Tests.cs b/src/Chapter05.Tests/Listing05.13.UsingStaticDirective.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.12.Tests.cs rename to src/Chapter05.Tests/Listing05.13.UsingStaticDirective.Tests.cs index 829881823..c32749eed 100644 --- a/src/Chapter05.Tests/Listing05.12.Tests.cs +++ b/src/Chapter05.Tests/Listing05.13.UsingStaticDirective.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_13.Tests; [TestClass] public class HeyYouTests diff --git a/src/Chapter05.Tests/Listing05.15.Tests.cs b/src/Chapter05.Tests/Listing05.16.PassingCommandLineArgumentsToMain.Tests.cs similarity index 99% rename from src/Chapter05.Tests/Listing05.15.Tests.cs rename to src/Chapter05.Tests/Listing05.16.PassingCommandLineArgumentsToMain.Tests.cs index e3b9434eb..aec436bdf 100644 --- a/src/Chapter05.Tests/Listing05.15.Tests.cs +++ b/src/Chapter05.Tests/Listing05.16.PassingCommandLineArgumentsToMain.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_15.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.16.Tests.cs b/src/Chapter05.Tests/Listing05.17.PassingVariablesByValue.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.16.Tests.cs rename to src/Chapter05.Tests/Listing05.17.PassingVariablesByValue.Tests.cs index 908e2f2d6..0c7e77e05 100644 --- a/src/Chapter05.Tests/Listing05.16.Tests.cs +++ b/src/Chapter05.Tests/Listing05.17.PassingVariablesByValue.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.17.Tests.cs b/src/Chapter05.Tests/Listing05.18.PassingVariablesByReference.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.17.Tests.cs rename to src/Chapter05.Tests/Listing05.18.PassingVariablesByReference.Tests.cs index 2b935f0ab..0939a5edb 100644 --- a/src/Chapter05.Tests/Listing05.17.Tests.cs +++ b/src/Chapter05.Tests/Listing05.18.PassingVariablesByReference.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.18.Tests.cs b/src/Chapter05.Tests/Listing05.19.PassingVariablesOutOnly.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.18.Tests.cs rename to src/Chapter05.Tests/Listing05.19.PassingVariablesOutOnly.Tests.cs index dabd55ef0..71155a9aa 100644 --- a/src/Chapter05.Tests/Listing05.18.Tests.cs +++ b/src/Chapter05.Tests/Listing05.19.PassingVariablesOutOnly.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19.Tests; [TestClass] public class ConvertToPhoneNumberTests diff --git a/src/Chapter05.Tests/Listing05.19.Tests.cs b/src/Chapter05.Tests/Listing05.20.ReturningAReference.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.19.Tests.cs rename to src/Chapter05.Tests/Listing05.20.ReturningAReference.Tests.cs index e4269bd7c..c09e86b1d 100644 --- a/src/Chapter05.Tests/Listing05.19.Tests.cs +++ b/src/Chapter05.Tests/Listing05.20.ReturningAReference.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.20.Tests.cs b/src/Chapter05.Tests/Listing05.21.PassingAVariableParameterList.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.20.Tests.cs rename to src/Chapter05.Tests/Listing05.21.PassingAVariableParameterList.Tests.cs index 372beea1d..d08cee478 100644 --- a/src/Chapter05.Tests/Listing05.20.Tests.cs +++ b/src/Chapter05.Tests/Listing05.21.PassingAVariableParameterList.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.21.Tests.cs b/src/Chapter05.Tests/Listing05.22.CountingLinesGivenADirectory.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.21.Tests.cs rename to src/Chapter05.Tests/Listing05.22.CountingLinesGivenADirectory.Tests.cs index 2788ef3d8..5b24bf00b 100644 --- a/src/Chapter05.Tests/Listing05.21.Tests.cs +++ b/src/Chapter05.Tests/Listing05.22.CountingLinesGivenADirectory.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.23.Tests.cs b/src/Chapter05.Tests/Listing05.23.CountingLinesUsingOverloading.Tests.cs similarity index 100% rename from src/Chapter05.Tests/Listing05.23.Tests.cs rename to src/Chapter05.Tests/Listing05.23.CountingLinesUsingOverloading.Tests.cs diff --git a/src/Chapter05.Tests/Listing05.22.Tests.cs b/src/Chapter05.Tests/Listing05.24.MethodsWithOptionalParameters.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.22.Tests.cs rename to src/Chapter05.Tests/Listing05.24.MethodsWithOptionalParameters.Tests.cs index f7be8ca22..0182b3514 100644 --- a/src/Chapter05.Tests/Listing05.22.Tests.cs +++ b/src/Chapter05.Tests/Listing05.24.MethodsWithOptionalParameters.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.25.Tests.cs b/src/Chapter05.Tests/Listing05.26.ConvertingAStringToAnInt.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.25.Tests.cs rename to src/Chapter05.Tests/Listing05.26.ConvertingAStringToAnInt.Tests.cs index 7de989514..50d6722d7 100644 --- a/src/Chapter05.Tests/Listing05.25.Tests.cs +++ b/src/Chapter05.Tests/Listing05.26.ConvertingAStringToAnInt.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26.Tests; [TestClass] public class ExceptionHandlingTests diff --git a/src/Chapter05.Tests/Listing05.26.Tests.cs b/src/Chapter05.Tests/Listing05.27.CatchingAnException.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.26.Tests.cs rename to src/Chapter05.Tests/Listing05.27.CatchingAnException.Tests.cs index cff1c1754..7351a9ebf 100644 --- a/src/Chapter05.Tests/Listing05.26.Tests.cs +++ b/src/Chapter05.Tests/Listing05.27.CatchingAnException.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27.Tests; [TestClass] public class ExceptionHandlingTests diff --git a/src/Chapter05.Tests/Listing05.27.Tests.cs b/src/Chapter05.Tests/Listing05.28.FinallyWithoutCatch.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.27.Tests.cs rename to src/Chapter05.Tests/Listing05.28.FinallyWithoutCatch.Tests.cs index 61970462c..0c9d43fcc 100644 --- a/src/Chapter05.Tests/Listing05.27.Tests.cs +++ b/src/Chapter05.Tests/Listing05.28.FinallyWithoutCatch.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28.Tests; [TestClass] public class ExceptionHandlingTests diff --git a/src/Chapter05.Tests/Listing05.28.Tests.cs b/src/Chapter05.Tests/Listing05.29.GeneralCatchBlocks.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.28.Tests.cs rename to src/Chapter05.Tests/Listing05.29.GeneralCatchBlocks.Tests.cs index bf6770e06..650686274 100644 --- a/src/Chapter05.Tests/Listing05.28.Tests.cs +++ b/src/Chapter05.Tests/Listing05.29.GeneralCatchBlocks.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.29.Tests.cs b/src/Chapter05.Tests/Listing05.30.ThrowingAnException.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.29.Tests.cs rename to src/Chapter05.Tests/Listing05.30.ThrowingAnException.Tests.cs index 679db5831..4e10a37f7 100644 --- a/src/Chapter05.Tests/Listing05.29.Tests.cs +++ b/src/Chapter05.Tests/Listing05.30.ThrowingAnException.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30.Tests; [TestClass] public class ThrowingExceptionsTests diff --git a/src/Chapter05.Tests/Listing05.30.Tests.cs b/src/Chapter05.Tests/Listing05.31.RethrowingAnException.Tests.cs similarity index 96% rename from src/Chapter05.Tests/Listing05.30.Tests.cs rename to src/Chapter05.Tests/Listing05.31.RethrowingAnException.Tests.cs index e76c006fe..17b76d60d 100644 --- a/src/Chapter05.Tests/Listing05.30.Tests.cs +++ b/src/Chapter05.Tests/Listing05.31.RethrowingAnException.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31.Tests; [TestClass] public class ThrowingExceptionsTests diff --git a/src/Chapter05.Tests/Listing05.31.Tests.cs b/src/Chapter05.Tests/Listing05.32.ParameterValidationThrowingArgumentNullException.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.31.Tests.cs rename to src/Chapter05.Tests/Listing05.32.ParameterValidationThrowingArgumentNullException.Tests.cs index 129042df3..51686dc50 100644 --- a/src/Chapter05.Tests/Listing05.31.Tests.cs +++ b/src/Chapter05.Tests/Listing05.32.ParameterValidationThrowingArgumentNullException.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.32.Tests.cs b/src/Chapter05.Tests/Listing05.33.ParameterValidationWithArgumentException.ThrowIfNull.Tests.cs similarity index 97% rename from src/Chapter05.Tests/Listing05.32.Tests.cs rename to src/Chapter05.Tests/Listing05.33.ParameterValidationWithArgumentException.ThrowIfNull.Tests.cs index 1e19b25d6..591405d93 100644 --- a/src/Chapter05.Tests/Listing05.32.Tests.cs +++ b/src/Chapter05.Tests/Listing05.33.ParameterValidationWithArgumentException.ThrowIfNull.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.33.Tests.cs b/src/Chapter05.Tests/Listing05.34.CustomParameterValidation.Tests.cs similarity index 99% rename from src/Chapter05.Tests/Listing05.33.Tests.cs rename to src/Chapter05.Tests/Listing05.34.CustomParameterValidation.Tests.cs index 6c22f3855..64409dee5 100644 --- a/src/Chapter05.Tests/Listing05.33.Tests.cs +++ b/src/Chapter05.Tests/Listing05.34.CustomParameterValidation.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34.Tests; [TestClass] public class ProgramTests diff --git a/src/Chapter05.Tests/Listing05.34.Tests.cs b/src/Chapter05.Tests/Listing05.35.TryCatch.Tests.cs similarity index 98% rename from src/Chapter05.Tests/Listing05.34.Tests.cs rename to src/Chapter05.Tests/Listing05.35.TryCatch.Tests.cs index 6e7dfd2f7..cabd9e88f 100644 --- a/src/Chapter05.Tests/Listing05.34.Tests.cs +++ b/src/Chapter05.Tests/Listing05.35.TryCatch.Tests.cs @@ -1,6 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34.Tests; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_35.Tests; [TestClass] public class LeveragingTryParseTests diff --git a/src/Chapter05/Listing05.10.UsingDirectiveExample.cs b/src/Chapter05/Listing05.08.UsingDirectiveExample.cs similarity index 99% rename from src/Chapter05/Listing05.10.UsingDirectiveExample.cs rename to src/Chapter05/Listing05.08.UsingDirectiveExample.cs index 24fa9eb6f..11a5e7ab5 100644 --- a/src/Chapter05/Listing05.10.UsingDirectiveExample.cs +++ b/src/Chapter05/Listing05.08.UsingDirectiveExample.cs @@ -2,7 +2,7 @@ // and the attribute is not available in .NET 6.0. #pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute'. -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_10; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_08; #region INCLUDE // The using directive imports all types from the diff --git a/src/Chapter05/Listing05.08.ImplicitUsingsGeneratedGlocalUsingDeclaratives.cs b/src/Chapter05/Listing05.09.ImplicitUsingsGeneratedGlocalUsingDeclaratives.cs similarity index 100% rename from src/Chapter05/Listing05.08.ImplicitUsingsGeneratedGlocalUsingDeclaratives.cs rename to src/Chapter05/Listing05.09.ImplicitUsingsGeneratedGlocalUsingDeclaratives.cs diff --git a/src/Chapter05/Listing05.09.StringBuilderImplicitUsingStatements.cs b/src/Chapter05/Listing05.10.StringBuilderImplicitUsingStatements.cs similarity index 98% rename from src/Chapter05/Listing05.09.StringBuilderImplicitUsingStatements.cs rename to src/Chapter05/Listing05.10.StringBuilderImplicitUsingStatements.cs index 09331c34b..5c0f5ab86 100644 --- a/src/Chapter05/Listing05.09.StringBuilderImplicitUsingStatements.cs +++ b/src/Chapter05/Listing05.10.StringBuilderImplicitUsingStatements.cs @@ -4,7 +4,7 @@ global using System.Text; #region EXCLUDE -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_09; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_10; #endregion EXCLUDE public class Program diff --git a/src/Chapter05/Listing05.11.SampleConsoleProjectFileWithUsingElement.xml b/src/Chapter05/Listing05.11.SampleConsoleProjectFileWithUsingElement.xml new file mode 100644 index 000000000..8d80c65e3 --- /dev/null +++ b/src/Chapter05/Listing05.11.SampleConsoleProjectFileWithUsingElement.xml @@ -0,0 +1,13 @@ + + + + Exe + net7.0 + enable + enable + + + + + + \ No newline at end of file diff --git a/src/Chapter05/Listing05.11.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs b/src/Chapter05/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs similarity index 99% rename from src/Chapter05/Listing05.11.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs rename to src/Chapter05/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs index 69d6052c7..85d486e05 100644 --- a/src/Chapter05/Listing05.11.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs +++ b/src/Chapter05/Listing05.12.SpecifyingTheUsingDirectiveInsideANamespaceDeclaration.cs @@ -2,7 +2,7 @@ // and the attribute is not available in .NET 6.0. #pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute'. -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_11; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12; #region INCLUDE // The using directive imports all types from the diff --git a/src/Chapter05/Listing05.12.UsingStaticDirective.cs b/src/Chapter05/Listing05.13.UsingStaticDirective.cs similarity index 98% rename from src/Chapter05/Listing05.12.UsingStaticDirective.cs rename to src/Chapter05/Listing05.13.UsingStaticDirective.cs index 71c76dcc6..7dfba3799 100644 --- a/src/Chapter05/Listing05.12.UsingStaticDirective.cs +++ b/src/Chapter05/Listing05.13.UsingStaticDirective.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_12; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_13; #region INCLUDE using static System.Console; diff --git a/src/Chapter05/Listing05.13.DeclaringATypeAlias.cs b/src/Chapter05/Listing05.14.DeclaringATypeAlias.cs similarity index 97% rename from src/Chapter05/Listing05.13.DeclaringATypeAlias.cs rename to src/Chapter05/Listing05.14.DeclaringATypeAlias.cs index 27bc1b5a8..1e093bba9 100644 --- a/src/Chapter05/Listing05.13.DeclaringATypeAlias.cs +++ b/src/Chapter05/Listing05.14.DeclaringATypeAlias.cs @@ -1,5 +1,5 @@ #pragma warning disable CS0168 // Variable is declared but never used -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_13; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_14; #region INCLUDE #region HIGHLIGHT diff --git a/src/Chapter05/Listing05.14.DeclaringATypeAliasWithTheSameName.cs b/src/Chapter05/Listing05.15.DeclaringATypeAliasWithTheSameName.cs similarity index 98% rename from src/Chapter05/Listing05.14.DeclaringATypeAliasWithTheSameName.cs rename to src/Chapter05/Listing05.15.DeclaringATypeAliasWithTheSameName.cs index ad1b9953f..656e1f0fb 100644 --- a/src/Chapter05/Listing05.14.DeclaringATypeAliasWithTheSameName.cs +++ b/src/Chapter05/Listing05.15.DeclaringATypeAliasWithTheSameName.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_15; #region INCLUDE diff --git a/src/Chapter05/Listing05.15.PassingCommandLineArgumentsToMain.cs b/src/Chapter05/Listing05.16.PassingCommandLineArgumentsToMain.cs similarity index 99% rename from src/Chapter05/Listing05.15.PassingCommandLineArgumentsToMain.cs rename to src/Chapter05/Listing05.16.PassingCommandLineArgumentsToMain.cs index 6fa3142a1..b5279c6d1 100644 --- a/src/Chapter05/Listing05.15.PassingCommandLineArgumentsToMain.cs +++ b/src/Chapter05/Listing05.16.PassingCommandLineArgumentsToMain.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_15; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16; #region INCLUDE public class Program diff --git a/src/Chapter05/Listing05.16.PassingVariablesByValue.cs b/src/Chapter05/Listing05.17.PassingVariablesByValue.cs similarity index 98% rename from src/Chapter05/Listing05.16.PassingVariablesByValue.cs rename to src/Chapter05/Listing05.17.PassingVariablesByValue.cs index d11d1e1c0..00e1f2d97 100644 --- a/src/Chapter05/Listing05.16.PassingVariablesByValue.cs +++ b/src/Chapter05/Listing05.17.PassingVariablesByValue.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_16; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17; using System; diff --git a/src/Chapter05/Listing05.17.PassingVariablesByReference.cs b/src/Chapter05/Listing05.18.PassingVariablesByReference.cs similarity index 98% rename from src/Chapter05/Listing05.17.PassingVariablesByReference.cs rename to src/Chapter05/Listing05.18.PassingVariablesByReference.cs index c0d485397..47497d004 100644 --- a/src/Chapter05/Listing05.17.PassingVariablesByReference.cs +++ b/src/Chapter05/Listing05.18.PassingVariablesByReference.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_17; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18; #region INCLUDE public class Program diff --git a/src/Chapter05/Listing05.18.PassingVariablesOutOnly.cs b/src/Chapter05/Listing05.19.PassingVariablesOutOnly.cs similarity index 99% rename from src/Chapter05/Listing05.18.PassingVariablesOutOnly.cs rename to src/Chapter05/Listing05.19.PassingVariablesOutOnly.cs index a9ab420e6..1584f82a8 100644 --- a/src/Chapter05/Listing05.18.PassingVariablesOutOnly.cs +++ b/src/Chapter05/Listing05.19.PassingVariablesOutOnly.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_18; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19; public class ConvertToPhoneNumber { diff --git a/src/Chapter05/Listing05.19.ReturningAReference.cs b/src/Chapter05/Listing05.20.ReturningAReference.cs similarity index 99% rename from src/Chapter05/Listing05.19.ReturningAReference.cs rename to src/Chapter05/Listing05.20.ReturningAReference.cs index 6d76d6bf7..3ce0b09bc 100644 --- a/src/Chapter05/Listing05.19.ReturningAReference.cs +++ b/src/Chapter05/Listing05.20.ReturningAReference.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_19; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20; using System; diff --git a/src/Chapter05/Listing05.20.PassingAVariableParameterList.cs b/src/Chapter05/Listing05.21.PassingAVariableParameterList.cs similarity index 99% rename from src/Chapter05/Listing05.20.PassingAVariableParameterList.cs rename to src/Chapter05/Listing05.21.PassingAVariableParameterList.cs index 2292483ad..d3918a3ee 100644 --- a/src/Chapter05/Listing05.20.PassingAVariableParameterList.cs +++ b/src/Chapter05/Listing05.21.PassingAVariableParameterList.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_20; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21; #region INCLUDE using System; diff --git a/src/Chapter05/Listing05.21.CountingLinesGivenADirectory.cs b/src/Chapter05/Listing05.22.CountingLinesGivenADirectory.cs similarity index 99% rename from src/Chapter05/Listing05.21.CountingLinesGivenADirectory.cs rename to src/Chapter05/Listing05.22.CountingLinesGivenADirectory.cs index ac34baa34..92709f4cb 100644 --- a/src/Chapter05/Listing05.21.CountingLinesGivenADirectory.cs +++ b/src/Chapter05/Listing05.22.CountingLinesGivenADirectory.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_21; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22; #region INCLUDE using System.IO; diff --git a/src/Chapter05/Listing05.22.CountingLinesUsingOverloading.cs b/src/Chapter05/Listing05.23.CountingLinesUsingOverloading.cs similarity index 99% rename from src/Chapter05/Listing05.22.CountingLinesUsingOverloading.cs rename to src/Chapter05/Listing05.23.CountingLinesUsingOverloading.cs index 22a50dabe..264dbdf91 100644 --- a/src/Chapter05/Listing05.22.CountingLinesUsingOverloading.cs +++ b/src/Chapter05/Listing05.23.CountingLinesUsingOverloading.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_22; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_23; #region INCLUDE public static class LineCounter diff --git a/src/Chapter05/Listing05.23.MethodsWithOptionalParameters.cs b/src/Chapter05/Listing05.24.MethodsWithOptionalParameters.cs similarity index 99% rename from src/Chapter05/Listing05.23.MethodsWithOptionalParameters.cs rename to src/Chapter05/Listing05.24.MethodsWithOptionalParameters.cs index ab6c8e7d7..97dcd5319 100644 --- a/src/Chapter05/Listing05.23.MethodsWithOptionalParameters.cs +++ b/src/Chapter05/Listing05.24.MethodsWithOptionalParameters.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_23; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24; #region INCLUDE public static class LineCounter diff --git a/src/Chapter05/Listing05.24.SpecifyingParametersByName.cs b/src/Chapter05/Listing05.25.SpecifyingParametersByName.cs similarity index 97% rename from src/Chapter05/Listing05.24.SpecifyingParametersByName.cs rename to src/Chapter05/Listing05.25.SpecifyingParametersByName.cs index 534a324c9..108fcef9e 100644 --- a/src/Chapter05/Listing05.24.SpecifyingParametersByName.cs +++ b/src/Chapter05/Listing05.25.SpecifyingParametersByName.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_24; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25; public class Program { diff --git a/src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs b/src/Chapter05/Listing05.26.ConvertingAStringToAnInt.cs similarity index 98% rename from src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs rename to src/Chapter05/Listing05.26.ConvertingAStringToAnInt.cs index 31a63668f..7f3c64b7c 100644 --- a/src/Chapter05/Listing05.25.ConvertingAStringToAnInt.cs +++ b/src/Chapter05/Listing05.26.ConvertingAStringToAnInt.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_25; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26; public class ExceptionHandling { diff --git a/src/Chapter05/Listing05.26.CatchingAnException.cs b/src/Chapter05/Listing05.27.CatchingAnException.cs similarity index 99% rename from src/Chapter05/Listing05.26.CatchingAnException.cs rename to src/Chapter05/Listing05.27.CatchingAnException.cs index 108204919..c6c1dd802 100644 --- a/src/Chapter05/Listing05.26.CatchingAnException.cs +++ b/src/Chapter05/Listing05.27.CatchingAnException.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_26; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27; #region INCLUDE public class ExceptionHandling diff --git a/src/Chapter05/Listing05.27.FinallyWithoutCatch.cs b/src/Chapter05/Listing05.28.FinallyWithoutCatch.cs similarity index 98% rename from src/Chapter05/Listing05.27.FinallyWithoutCatch.cs rename to src/Chapter05/Listing05.28.FinallyWithoutCatch.cs index 9281bff0a..f2f45671a 100644 --- a/src/Chapter05/Listing05.27.FinallyWithoutCatch.cs +++ b/src/Chapter05/Listing05.28.FinallyWithoutCatch.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_27; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28; #region INCLUDE using System; diff --git a/src/Chapter05/Listing05.28.GeneralCatchBlocks.cs b/src/Chapter05/Listing05.29.GeneralCatchBlocks.cs similarity index 99% rename from src/Chapter05/Listing05.28.GeneralCatchBlocks.cs rename to src/Chapter05/Listing05.29.GeneralCatchBlocks.cs index 9533ba627..116122c1c 100644 --- a/src/Chapter05/Listing05.28.GeneralCatchBlocks.cs +++ b/src/Chapter05/Listing05.29.GeneralCatchBlocks.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_28; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_29; #pragma warning disable CS0168 // Variable is declared but never used #region INCLUDE diff --git a/src/Chapter05/Listing05.29.ThrowingAnException.cs b/src/Chapter05/Listing05.30.ThrowingAnException.cs similarity index 99% rename from src/Chapter05/Listing05.29.ThrowingAnException.cs rename to src/Chapter05/Listing05.30.ThrowingAnException.cs index f5b319932..e086e8f10 100644 --- a/src/Chapter05/Listing05.29.ThrowingAnException.cs +++ b/src/Chapter05/Listing05.30.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_29; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_30; public class ThrowingExceptions { diff --git a/src/Chapter05/Listing05.30.RethrowingAnException.cs b/src/Chapter05/Listing05.31.RethrowingAnException.cs similarity index 99% rename from src/Chapter05/Listing05.30.RethrowingAnException.cs rename to src/Chapter05/Listing05.31.RethrowingAnException.cs index 65bf53add..4b9741975 100644 --- a/src/Chapter05/Listing05.30.RethrowingAnException.cs +++ b/src/Chapter05/Listing05.31.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_30; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31; public class ThrowingExceptions { diff --git a/src/Chapter05/Listing05.31.ParameterValidationThrowingArgumentNullException.cs b/src/Chapter05/Listing05.32.ParameterValidationThrowingArgumentNullException.cs similarity index 98% rename from src/Chapter05/Listing05.31.ParameterValidationThrowingArgumentNullException.cs rename to src/Chapter05/Listing05.32.ParameterValidationThrowingArgumentNullException.cs index ab95bf269..bbd16e77f 100644 --- a/src/Chapter05/Listing05.31.ParameterValidationThrowingArgumentNullException.cs +++ b/src/Chapter05/Listing05.32.ParameterValidationThrowingArgumentNullException.cs @@ -1,5 +1,5 @@ #pragma warning disable IDE0059 // Unnecessary assignment of a value -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_31; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32; public class Program { diff --git a/src/Chapter05/Listing05.32.ParameterValidationWithArgumentException.ThrowIfNull.cs b/src/Chapter05/Listing05.33.ParameterValidationWithArgumentException.ThrowIfNull.cs similarity index 98% rename from src/Chapter05/Listing05.32.ParameterValidationWithArgumentException.ThrowIfNull.cs rename to src/Chapter05/Listing05.33.ParameterValidationWithArgumentException.ThrowIfNull.cs index 668cc9c0c..cabed7bdb 100644 --- a/src/Chapter05/Listing05.32.ParameterValidationWithArgumentException.ThrowIfNull.cs +++ b/src/Chapter05/Listing05.33.ParameterValidationWithArgumentException.ThrowIfNull.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_32; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33; public class Program { diff --git a/src/Chapter05/Listing05.33.CustomParameterValidation.cs b/src/Chapter05/Listing05.34.CustomParameterValidation.cs similarity index 99% rename from src/Chapter05/Listing05.33.CustomParameterValidation.cs rename to src/Chapter05/Listing05.34.CustomParameterValidation.cs index 6c8ecf7ab..88aa85290 100644 --- a/src/Chapter05/Listing05.33.CustomParameterValidation.cs +++ b/src/Chapter05/Listing05.34.CustomParameterValidation.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_33; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34; #region INCLUDE public class Program diff --git a/src/Chapter05/Listing05.34.TryCatch.cs b/src/Chapter05/Listing05.35.TryCatch.cs similarity index 98% rename from src/Chapter05/Listing05.34.TryCatch.cs rename to src/Chapter05/Listing05.35.TryCatch.cs index 2479e707b..f1e517fde 100644 --- a/src/Chapter05/Listing05.34.TryCatch.cs +++ b/src/Chapter05/Listing05.35.TryCatch.cs @@ -1,4 +1,4 @@ -namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_34; +namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_35; public class LeveragingTryParse {