diff --git a/snippets/csharp/VS_Snippets_CLR/string.compare3/CS/comp3.cs b/snippets/csharp/VS_Snippets_CLR/string.compare3/CS/comp3.cs index 30730ed60b7..3390fa305d4 100644 --- a/snippets/csharp/VS_Snippets_CLR/string.compare3/CS/comp3.cs +++ b/snippets/csharp/VS_Snippets_CLR/string.compare3/CS/comp3.cs @@ -1,9 +1,9 @@ -// -// Sample for String.Compare(String, Int32, String, Int32, Int32) +// Sample for String.Compare(String, Int32, String, Int32, Int32) using System; class Sample { public static void Main() { + // // 0123456 String str1 = "machine"; String str2 = "device"; @@ -17,12 +17,13 @@ public static void Main() { Console.Write("Substring '{0}' in '{1}' is ", str1.Substring(2, 2), str1); Console.Write("{0} ", str); Console.WriteLine("substring '{0}' in '{1}'.", str2.Substring(0, 2), str2); + + /* + This example produces the following results: + + str1 = 'machine', str2 = 'device' + Substring 'ch' in 'machine' is less than substring 'de' in 'device'. + */ + // } } -/* -This example produces the following results: - -str1 = 'machine', str2 = 'device' -Substring 'ch' in 'machine' is less than substring 'de' in 'device'. -*/ -// \ No newline at end of file diff --git a/snippets/csharp/VS_Snippets_CLR/string.compare4/CS/comp4.cs b/snippets/csharp/VS_Snippets_CLR/string.compare4/CS/comp4.cs index a70b721f695..7ef0f68a133 100644 --- a/snippets/csharp/VS_Snippets_CLR/string.compare4/CS/comp4.cs +++ b/snippets/csharp/VS_Snippets_CLR/string.compare4/CS/comp4.cs @@ -1,9 +1,9 @@ -// -// Sample for String.Compare(String, Int32, String, Int32, Int32, Boolean) +// Sample for String.Compare(String, Int32, String, Int32, Int32, Boolean) using System; class Sample { public static void Main() { + // // 0123456 String str1 = "MACHINE"; String str2 = "machine"; @@ -26,16 +26,17 @@ public static void Main() { Console.Write("Substring '{0}' in '{1}' is ", str1.Substring(2, 2), str1); Console.Write("{0} ", str); Console.WriteLine("substring '{0}' in '{1}'.", str2.Substring(2, 2), str2); - } -} -/* -This example produces the following results: -str1 = 'MACHINE', str2 = 'machine' -Ignore case: -Substring 'CH' in 'MACHINE' is equal to substring 'ch' in 'machine'. + /* + This example produces the following results: + + str1 = 'MACHINE', str2 = 'machine' + Ignore case: + Substring 'CH' in 'MACHINE' is equal to substring 'ch' in 'machine'. -Honor case: -Substring 'CH' in 'MACHINE' is greater than substring 'ch' in 'machine'. -*/ -// \ No newline at end of file + Honor case: + Substring 'CH' in 'MACHINE' is greater than substring 'ch' in 'machine'. + */ + // + } +} diff --git a/snippets/csharp/VS_Snippets_CLR_System/system.String.Compare/cs/Example.cs b/snippets/csharp/VS_Snippets_CLR_System/system.String.Compare/cs/Example.cs index 99771a651b6..60e39a7d586 100644 --- a/snippets/csharp/VS_Snippets_CLR_System/system.String.Compare/cs/Example.cs +++ b/snippets/csharp/VS_Snippets_CLR_System/system.String.Compare/cs/Example.cs @@ -1,11 +1,11 @@ -using System; +// +using System; using System.Globalization; public class Example { public static void Main() { - // string string1 = "brother"; string string2 = "Brother"; string relation; @@ -53,6 +53,6 @@ public static void Main() // 'brother' comes before 'Brother'. // 'brother' is the same as 'Brother'. // 'brother' comes after 'Brother'. - // } } +//