diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs index 4bcb85a13c2..4359fc76797 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs @@ -1,12 +1,12 @@ -using System; +using System; public class SamplesArray2 { public static void Main() { // - // Creates and initializes a new three-dimensional Array of type Int32. - Array myArr = Array.CreateInstance(typeof(Int32), 2, 3, 4); + // Creates and initializes a new three-dimensional Array of type int. + Array myArr = Array.CreateInstance(typeof(int), 2, 3, 4); for (int i = myArr.GetLowerBound(0); i <= myArr.GetUpperBound(0); i++) { for (int j = myArr.GetLowerBound(1); j <= myArr.GetUpperBound(1); j++) diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.BinarySearch Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.BinarySearch Example/CS/source.cs index 415f3b2442c..a9e0a704496 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.BinarySearch Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.BinarySearch Example/CS/source.cs @@ -1,4 +1,4 @@ -// +// using System; public class SamplesArray @@ -6,7 +6,7 @@ public class SamplesArray public static void Main() { // Creates and initializes a new Array. - Array myIntArray = Array.CreateInstance(typeof(Int32), 5); + Array myIntArray = Array.CreateInstance(typeof(int), 5); myIntArray.SetValue(8, 0); myIntArray.SetValue(2, 1); @@ -18,7 +18,7 @@ public static void Main() Array.Sort(myIntArray); // Displays the values of the Array. - Console.WriteLine( "The Int32 array contains the following:" ); + Console.WriteLine( "The int array contains the following:" ); PrintValues(myIntArray); // Locates a specific object that does not exist in the Array. @@ -65,7 +65,7 @@ public static void PrintValues(Array myArr) } // This code produces the following output. // -//The Int32 array contains the following: +//The int array contains the following: // 2 3 6 7 8 //The object to search for (1) is not found. The next larger object is at index 0 // diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Copy1 Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Copy1 Example/CS/source.cs index 3dc2d739283..c336ced9871 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Copy1 Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Copy1 Example/CS/source.cs @@ -1,10 +1,10 @@ -// +// using System; public class SamplesArray { public static void Main() { - // Creates and initializes a new Array of type Int32. + // Creates and initializes a new Array of type int. Array myIntArray=Array.CreateInstance( typeof(System.Int32), 5 ); for ( int i = myIntArray.GetLowerBound(0); i <= myIntArray.GetUpperBound(0); i++ ) myIntArray.SetValue( i+1, i ); @@ -15,21 +15,21 @@ public static void Main() { myObjArray.SetValue( i+26, i ); // Displays the initial values of both arrays. - Console.WriteLine( "Int32 array:" ); + Console.WriteLine( "int array:" ); PrintValues( myIntArray ); Console.WriteLine( "Object array:" ); PrintValues( myObjArray ); - // Copies the first element from the Int32 array to the Object array. + // Copies the first element from the int array to the Object array. Array.Copy( myIntArray, myIntArray.GetLowerBound(0), myObjArray, myObjArray.GetLowerBound(0), 1 ); - // Copies the last two elements from the Object array to the Int32 array. + // Copies the last two elements from the Object array to the int array. Array.Copy( myObjArray, myObjArray.GetUpperBound(0) - 1, myIntArray, myIntArray.GetUpperBound(0) - 1, 2 ); // Displays the values of the modified arrays. - Console.WriteLine( "Int32 array - Last two elements should now be the same as Object array:" ); + Console.WriteLine( "int array - Last two elements should now be the same as Object array:" ); PrintValues( myIntArray ); - Console.WriteLine( "Object array - First element should now be the same as Int32 array:" ); + Console.WriteLine( "Object array - First element should now be the same as int array:" ); PrintValues( myObjArray ); } @@ -52,13 +52,13 @@ public static void PrintValues( Array myArr ) { /* This code produces the following output. - Int32 array: + int array: 1 2 3 4 5 Object array: 26 27 28 29 30 - Int32 array - Last two elements should now be the same as Object array: + int array - Last two elements should now be the same as Object array: 1 2 3 29 30 - Object array - First element should now be the same as Int32 array: + Object array - First element should now be the same as int array: 1 27 28 29 30 */ // diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source.cs index 43ea1853b00..fd1381e4728 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source.cs @@ -8,14 +8,14 @@ public static void Main() { // Creates and initializes two new Arrays. - Array mySourceArray=Array.CreateInstance(typeof(String), 6); + Array mySourceArray=Array.CreateInstance(typeof(string), 6); mySourceArray.SetValue("three", 0); mySourceArray.SetValue("napping", 1); mySourceArray.SetValue("cats", 2); mySourceArray.SetValue("in", 3); mySourceArray.SetValue("the", 4); mySourceArray.SetValue("barn", 5); - Array myTargetArray=Array.CreateInstance(typeof(String), 15); + Array myTargetArray=Array.CreateInstance(typeof(string), 15); myTargetArray.SetValue("The", 0); myTargetArray.SetValue("quick", 1); myTargetArray.SetValue("brown", 2); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source2.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source2.cs index a65c09d282b..c390916540d 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source2.cs @@ -7,7 +7,7 @@ public class SamplesArray2 public static void Main() { // Creates and initializes the source Array. - Array myArrayZero=Array.CreateInstance(typeof(String), 3); + Array myArrayZero=Array.CreateInstance(typeof(string), 3); myArrayZero.SetValue("zero", 0); myArrayZero.SetValue("one", 1); @@ -18,7 +18,7 @@ public static void Main() // Creates and initializes the target Array. int[] myArrLen = { 4 }; int[] myArrLow = { 2 }; - Array myArrayTwo=Array.CreateInstance(typeof(String), myArrLen, myArrLow); + Array myArrayTwo=Array.CreateInstance(typeof(string), myArrLen, myArrLow); myArrayTwo.SetValue("two", 2); myArrayTwo.SetValue("three", 3); myArrayTwo.SetValue("four", 4); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/CS/source.cs index b76d0d0c453..fb7a956c8b9 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/CS/source.cs @@ -1,11 +1,11 @@ -// +// using System; public class SamplesArray { public static void Main() { - // Creates and initializes a one-dimensional Array of type Int32. - Array my1DArray=Array.CreateInstance( typeof(Int32), 5 ); + // Creates and initializes a one-dimensional Array of type int. + Array my1DArray=Array.CreateInstance( typeof(int), 5 ); for ( int i = my1DArray.GetLowerBound(0); i <= my1DArray.GetUpperBound(0); i++ ) my1DArray.SetValue( i+1, i ); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance1 Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance1 Example/CS/source.cs index 131106d70ea..945c7746e32 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance1 Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance1 Example/CS/source.cs @@ -1,11 +1,11 @@ -// +// using System; public class SamplesArray { public static void Main() { - // Creates and initializes a two-dimensional Array of type String. - Array my2DArray=Array.CreateInstance( typeof(String), 2, 3 ); + // Creates and initializes a two-dimensional Array of type string. + Array my2DArray=Array.CreateInstance( typeof(string), 2, 3 ); for ( int i = my2DArray.GetLowerBound(0); i <= my2DArray.GetUpperBound(0); i++ ) for ( int j = my2DArray.GetLowerBound(1); j <= my2DArray.GetUpperBound(1); j++ ) my2DArray.SetValue( "abc" + i + j, i, j ); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/CS/source.cs index b8720a6fcd5..0d71a9030a1 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/CS/source.cs @@ -1,12 +1,12 @@ -// +// using System; public class SamplesArray { public static void Main() { - // Creates and initializes a multidimensional Array of type String. + // Creates and initializes a multidimensional Array of type string. int[] myLengthsArray = new int[4] { 2, 3, 4, 5 }; - Array my4DArray=Array.CreateInstance( typeof(String), myLengthsArray ); + Array my4DArray=Array.CreateInstance( typeof(string), myLengthsArray ); for ( int i = my4DArray.GetLowerBound(0); i <= my4DArray.GetUpperBound(0); i++ ) for ( int j = my4DArray.GetLowerBound(1); j <= my4DArray.GetUpperBound(1); j++ ) for ( int k = my4DArray.GetLowerBound(2); k <= my4DArray.GetUpperBound(2); k++ ) diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance4 Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance4 Example/CS/source.cs index f0ac6d39e3f..a5dcb758dd5 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance4 Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance4 Example/CS/source.cs @@ -1,13 +1,13 @@ -// +// using System; public class SamplesArray { public static void Main() { - // Creates and initializes a multidimensional Array of type String. + // Creates and initializes a multidimensional Array of type string. int[] myLengthsArray = new int[2] { 3, 5 }; int[] myBoundsArray = new int[2] { 2, 3 }; - Array myArray=Array.CreateInstance( typeof(String), myLengthsArray, myBoundsArray ); + Array myArray=Array.CreateInstance( typeof(string), myLengthsArray, myBoundsArray ); for ( int i = myArray.GetLowerBound(0); i <= myArray.GetUpperBound(0); i++ ) for ( int j = myArray.GetLowerBound(1); j <= myArray.GetUpperBound(1); j++ ) { int[] myIndicesArray = new int[2] { i, j }; diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/CS/source.cs index 7089ca55205..2089615d1af 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/CS/source.cs @@ -1,4 +1,4 @@ -using System; +using System; public class Example { @@ -16,7 +16,7 @@ public static void Main() Console.WriteLine(" [{0,2}]: {1}", i, strings[i]); // Search for the first occurrence of the duplicated value. - String searchString = "the"; + string searchString = "the"; int index = Array.IndexOf(strings, searchString); Console.WriteLine("The first occurrence of \"{0}\" is at index {1}.", searchString, index); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/CS/source.cs index 70c622c5dba..c200c1d30a2 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/CS/source.cs @@ -1,11 +1,11 @@ -using System; +using System; public class SamplesArray { public static void Main() { // // Creates and initializes a new Array with three elements of the same value. - Array myArray=Array.CreateInstance( typeof(String), 12 ); + Array myArray=Array.CreateInstance( typeof(string), 12 ); myArray.SetValue( "the", 0 ); myArray.SetValue( "quick", 1 ); myArray.SetValue( "brown", 2 ); @@ -24,7 +24,7 @@ public static void Main() { PrintIndexAndValues( myArray ); // Searches for the last occurrence of the duplicated value. - String myString = "the"; + string myString = "the"; int myIndex = Array.LastIndexOf( myArray, myString ); Console.WriteLine( "The last occurrence of \"{0}\" is at index {1}.", myString, myIndex ); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs index 76757a5a0ba..499c9650852 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs @@ -1,11 +1,11 @@ -// +// using System; public class SamplesArray { public static void Main() { // Creates and initializes a new Array. - Array myArray=Array.CreateInstance( typeof(String), 9 ); + Array myArray=Array.CreateInstance( typeof(string), 9 ); myArray.SetValue( "The", 0 ); myArray.SetValue( "quick", 1 ); myArray.SetValue( "brown", 2 ); diff --git a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs index c418daa6e19..e3e7da786b3 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs @@ -1,11 +1,11 @@ -// +// using System; public class SamplesArray { public static void Main() { // Creates and initializes a new Array. - Array myArray=Array.CreateInstance( typeof(String), 9 ); + Array myArray=Array.CreateInstance( typeof(string), 9 ); myArray.SetValue( "The", 0 ); myArray.SetValue( "QUICK", 1 ); myArray.SetValue( "BROWN", 2 );