Removed class and Main definitions from INCLUDE region
MODIFY
src/Chapter03/Listing03.03.WorkingWithStrings.cs
src/Chapter03/Listing03.03.WorkingWithStrings.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_03
{
- #region INCLUDE
public class Uppercase
{
public static void Main()
{
+ #region INCLUDE
Console.Write("Enter text: ");
var text = Console.ReadLine();
@@ -12,7 +12,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_03
var uppercase = text.ToUpper();
Console.WriteLine(uppercase);
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

MODIFY
src/Chapter03/Listing03.05.ImplicitLocalVariablesWithAnonymousTypes.cs
src/Chapter03/Listing03.05.ImplicitLocalVariablesWithAnonymousTypes.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_05
{
- #region INCLUDE
public class Program
{
public static void Main()
{
+ #region INCLUDE
var patent1 =
new { Title = "Bifocals",
YearOfPublication = "1784" };
@@ -16,7 +16,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_05
$"{patent1.Title} ({patent1.YearOfPublication})");
Console.WriteLine(
$"{patent2.Title} ({patent2.YearOfPublication})");
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

MODIFY
src/Chapter03/Listing03.27.AdditionalArrayMethods.cs
src/Chapter03/Listing03.27.AdditionalArrayMethods.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_27
{
- #region INCLUDE
public class ProgrammingLanguages
{
public static void Main()
{
+ #region INCLUDE
string[] languages = new string[]{
"C#", "COBOL", "Java",
"C++", "TypeScript", "Swift",
@@ -44,8 +44,8 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_27
$"{ languages[0],-20 }\t{ languages[^1],-20 }");
Console.WriteLine(
$"After clearing, the array size is: { languages.Length }");
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

MODIFY
src/Chapter03/Listing03.31.ReversingAString.cs
src/Chapter03/Listing03.31.ReversingAString.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_31
{
- #region INCLUDE
public class Palindrome
{
public static void Main()
{
+ #region INCLUDE
string reverse, palindrome;
char[] temp;
@@ -37,7 +37,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_31
Console.WriteLine(
$"\"{palindrome}\" is NOT a palindrome.");
}
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

Removed class and Main definitions from INCLUDE region