Adjusted class and method outside the Include region
Additional include region adjustments
MODIFY
src/Chapter02/Listing02.18.Error-StringIsImmutable.cs
src/Chapter02/Listing02.18.Error-StringIsImmutable.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_18
{
- #region INCLUDE
public class Uppercase
{
public static void Main()
{
- string text;
-
+ #region INCLUDE
Console.Write("Enter text: ");
- text = Console.ReadLine();
+ string text = Console.ReadLine();
#region HIGHLIGHT
// UNEXPECTED: Does not convert text to uppercase
@@ -16,7 +14,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_18
#endregion HIGHLIGHT
Console.WriteLine(text);
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

MODIFY
src/Chapter02/Listing02.22.OverflowingAnIntegerValue.cs
src/Chapter02/Listing02.22.OverflowingAnIntegerValue.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_22
{
- #region INCLUDE
public class Program
{
public static void Main()
{
+ #region INCLUDE
// int.MaxValue equals 2147483647
int n = int.MaxValue;
n = n + 1;
Console.WriteLine(n);
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

MODIFY
src/Chapter02/Listing02.23.ACheckedBlockExample.cs
src/Chapter02/Listing02.23.ACheckedBlockExample.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_23
{
- #region INCLUDE
public class Program
{
public static void Main()
{
+ #region INCLUDE
#region HIGHLIGHT
checked
{
@@ -16,7 +16,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_23
#region HIGHLIGHT
}
#endregion HIGHLIGHT
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

MODIFY
src/Chapter02/Listing02.24.AnUncheckedBlockExample.cs
src/Chapter02/Listing02.24.AnUncheckedBlockExample.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_24
{
- #region INCLUDE
public class Program
{
public static void Main()
{
+ #region INCLUDE
unchecked
{
// int.MaxValue equals 2147483647
@@ -12,7 +12,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_24
n = n + 1;
Console.WriteLine(n);
}
+ #endregion INCLUDE
}
}
- #endregion INCLUDE
}

Adjusted class and method outside the Include region


Additional include region adjustments