Removed System. prefix.
And fixed line breaks for 1.19 comments example.
MODIFY
src/Chapter01/Listing01.02B.MultipleStatementsOneOneLine.cs
src/Chapter01/Listing01.02B.MultipleStatementsOneOneLine.cs
@@ -5,7 +5,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_02B
public static void Main()
{
#region INCLUDE
- System.Console.WriteLine("Up");System.Console.WriteLine("Down");
+ Console.WriteLine("Up"); Console.WriteLine("Down");
#endregion INCLUDE
}
}

MODIFY
src/Chapter01/Listing01.02C.MultipleStatementsOnSeparateLines.cs
src/Chapter01/Listing01.02C.MultipleStatementsOnSeparateLines.cs
@@ -5,9 +5,9 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_02C
public static void Main()
{
#region INCLUDE
- System.Console.WriteLine("Down");
- System.Console.WriteLine("Side");
- System.Console.WriteLine("Up");
+ Console.WriteLine("Down");
+ Console.WriteLine("Side");
+ Console.WriteLine("Up");
#endregion INCLUDE
}
}

MODIFY
src/Chapter01/Listing01.02D.SplittingAStatementAcrossMultipleLines.cs
src/Chapter01/Listing01.02D.SplittingAStatementAcrossMultipleLines.cs
@@ -5,7 +5,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_02D
public static void Main()
{
#region INCLUDE
- System.Console.WriteLine(
+ Console.WriteLine(
"Hello. My name is Inigo Montoya.");
#endregion INCLUDE
}

MODIFY
src/Chapter01/Listing01.08.NoIndentationFormatting.cs
src/Chapter01/Listing01.08.NoIndentationFormatting.cs
@@ -5,7 +5,7 @@ public class HelloWorld
{
public static void Main()
{
-System.Console.WriteLine("Hello Inigo Montoya");
+ Console.WriteLine("Hello Inigo Montoya");
}
}
#endregion INCLUDE

MODIFY
src/Chapter01/Listing01.09.RemovingWhitespace.cs
src/Chapter01/Listing01.09.RemovingWhitespace.cs
@@ -2,6 +2,6 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_09
{
#region INCLUDE
public class HelloWorld{public static void Main()
-{System.Console.WriteLine("Hello Inigo Montoya");}}
+{ Console.WriteLine("Hello Inigo Montoya");}}
#endregion INCLUDE
}

MODIFY
src/Chapter01/Listing01.10.DeclaringAndAssigningAVariable.cs
src/Chapter01/Listing01.10.DeclaringAndAssigningAVariable.cs
@@ -8,7 +8,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_10
string max; // "string" identifies the data type
// "max" is the variable
max = "Have fun storming the castle!";
- System.Console.WriteLine(max);
+ Console.WriteLine(max);
}
}
#endregion INCLUDE

MODIFY
src/Chapter01/Listing01.11.DeclaringTwoVariablesWithinOneStatement.cs
src/Chapter01/Listing01.11.DeclaringTwoVariablesWithinOneStatement.cs
@@ -11,8 +11,8 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_11
message1 = "My name is Inigo Montoya.";;
message2 = "You killed my father....";
- System.Console.WriteLine(message1);
- System.Console.WriteLine(message2);
+ Console.WriteLine(message1);
+ Console.WriteLine(message2);
}
}
}

MODIFY
src/Chapter01/Listing01.12.ChangingTheValueOfAVariable.cs
src/Chapter01/Listing01.12.ChangingTheValueOfAVariable.cs
@@ -12,13 +12,13 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_12
valerie = "Think it will work?";
#endregion HIGHLIGHT
- System.Console.WriteLine(miracleMax);
- System.Console.WriteLine(valerie);
+ Console.WriteLine(miracleMax);
+ Console.WriteLine(valerie);
#region HIGHLIGHT
miracleMax = "It would take a miracle.";
#endregion HIGHLIGHT
- System.Console.WriteLine(miracleMax);
+ Console.WriteLine(miracleMax);
}
}
#endregion INCLUDE

MODIFY
src/Chapter01/Listing01.13.AssignmentReturningAValueThatCanBeassignedAgain.cs
src/Chapter01/Listing01.13.AssignmentReturningAValueThatCanBeassignedAgain.cs
@@ -9,7 +9,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_13
string requirements, miracleMax;
requirements = miracleMax = "It would take a miracle.";
#region EXCLUDE
- System.Console.WriteLine(miracleMax);
+ Console.WriteLine(miracleMax);
#endregion EXCLUDE
}
}

MODIFY
src/Chapter01/Listing01.14.UsingSystemConsoleReadLine.cs
src/Chapter01/Listing01.14.UsingSystemConsoleReadLine.cs
@@ -8,13 +8,13 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_14
string firstName;
string lastName;
- System.Console.WriteLine("Hey you!");
+ Console.WriteLine("Hey you!");
- System.Console.Write("Enter your first name: ");
- firstName = System.Console.ReadLine();
+ Console.Write("Enter your first name: ");
+ firstName = Console.ReadLine();
- System.Console.Write("Enter your last name: ");
- lastName = System.Console.ReadLine();
+ Console.Write("Enter your last name: ");
+ lastName = Console.ReadLine();
}
}
#endregion INCLUDE

MODIFY
src/Chapter01/Listing01.15.UsingSystemConsoleRead.cs
src/Chapter01/Listing01.15.UsingSystemConsoleRead.cs
@@ -7,9 +7,9 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_15
#region INCLUDE
int readValue;
char character;
- readValue = System.Console.Read();
+ readValue = Console.Read();
character = (char) readValue;
- System.Console.Write(character);
+ Console.Write(character);
#endregion INCLUDE
}
}

MODIFY
src/Chapter01/Listing01.16.FormattingUsingStringInterpolation.cs
src/Chapter01/Listing01.16.FormattingUsingStringInterpolation.cs
@@ -8,15 +8,15 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_16
string firstName;
string lastName;
- System.Console.WriteLine("Hey you!");
+ Console.WriteLine("Hey you!");
- System.Console.Write("Enter your first name: ");
- firstName = System.Console.ReadLine();
+ Console.Write("Enter your first name: ");
+ firstName = Console.ReadLine();
- System.Console.Write("Enter your last name: ");
- lastName = System.Console.ReadLine();
+ Console.Write("Enter your last name: ");
+ lastName = Console.ReadLine();
- System.Console.WriteLine(
+ Console.WriteLine(
#region HIGHLIGHT
$"Your full name is { firstName } { lastName }.");
#endregion HIGHLIGHT

MODIFY
src/Chapter01/Listing01.17.FormattingUsingCompositeFormatting.cs
src/Chapter01/Listing01.17.FormattingUsingCompositeFormatting.cs
@@ -8,17 +8,17 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_17
string firstName;
string lastName;
- System.Console.WriteLine("Hey you!");
+ Console.WriteLine("Hey you!");
- System.Console.Write("Enter your first name: ");
- firstName = System.Console.ReadLine();
+ Console.Write("Enter your first name: ");
+ firstName = Console.ReadLine();
#region HIGHLIGHT
- System.Console.Write("Enter your last name: ");
- lastName = System.Console.ReadLine();
+ Console.Write("Enter your last name: ");
+ lastName = Console.ReadLine();
#endregion HIGHLIGHT
- System.Console.WriteLine(
+ Console.WriteLine(
"Your full name is {0} {1}.", firstName, lastName);
}
}

MODIFY
src/Chapter01/Listing01.18.SwappingTheIndexedPlaceholdersAndCorrespondingVariables.cs
src/Chapter01/Listing01.18.SwappingTheIndexedPlaceholdersAndCorrespondingVariables.cs
@@ -7,15 +7,15 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_18
string firstName;
string lastName;
- System.Console.WriteLine("Hey you!");
+ Console.WriteLine("Hey you!");
- System.Console.Write("Enter your first name: ");
- firstName = System.Console.ReadLine();
+ Console.Write("Enter your first name: ");
+ firstName = Console.ReadLine();
- System.Console.Write("Enter your last name: ");
- lastName = System.Console.ReadLine();
+ Console.Write("Enter your last name: ");
+ lastName = Console.ReadLine();
#region INCLUDE
- System.Console.WriteLine("Your full name is {1}, {0}.", firstName, lastName);
+ Console.WriteLine("Your full name is {1}, {0}.", firstName, lastName);
#endregion INCLUDE
}
}

MODIFY
src/Chapter01/Listing01.19.CommentingYourCode.cs
src/Chapter01/Listing01.19.CommentingYourCode.cs
-namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_19
-{
+namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_19;
+
#region INCLUDE
public class CommentSamples
{
@@ -8,24 +8,21 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_19
string firstName; // Variable for storing the first name
string lastName; // Variable for storing the last name
- System.Console.WriteLine("Hey you!");
+ Console.WriteLine("Hey you!");
- System.Console.Write /* No new line */ (
- "Enter your first name: ");
- firstName = System.Console.ReadLine();
+ Console.Write /* No new line */ ("Enter your first name: ");
+ firstName = Console.ReadLine();
- System.Console.Write /* No new line */ (
- "Enter your last name: ");
- lastName = System.Console.ReadLine();
+ Console.Write /* No new line */ ("Enter your last name: ");
+ lastName = Console.ReadLine();
/* Display a greeting to the console
using composite fomatting. */
- System.Console.WriteLine("Your full name is {1}, {0}.",
+ Console.WriteLine("Your full name is {1}, {0}.",
firstName, lastName);
// This is the end
// of the program listing
}
}
#endregion INCLUDE
-}
\ No newline at end of file

Removed System. prefix.

And fixed line breaks for 1.19 comments example.