Skip to content

Commit f6abd08

Browse files
Names -> Keywords (#6927)
Replacing full type names with keywords when appropriate Files affected: source3.cs, source.cs, source.cs, source.cs, source2.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs. See #6920
1 parent a7cecbc commit f6abd08

File tree

13 files changed

+42
-42
lines changed

13 files changed

+42
-42
lines changed

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using System;
1+
using System;
22

33
public class SamplesArray2
44
{
55
public static void Main()
66
{
77
// <Snippet2>
8-
// Creates and initializes a new three-dimensional Array of type Int32.
9-
Array myArr = Array.CreateInstance(typeof(Int32), 2, 3, 4);
8+
// Creates and initializes a new three-dimensional Array of type int.
9+
Array myArr = Array.CreateInstance(typeof(int), 2, 3, 4);
1010
for (int i = myArr.GetLowerBound(0); i <= myArr.GetUpperBound(0); i++)
1111
{
1212
for (int j = myArr.GetLowerBound(1); j <= myArr.GetUpperBound(1); j++)

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.BinarySearch Example/CS/source.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33

44
public class SamplesArray
55
{
66
public static void Main()
77
{
88
// Creates and initializes a new Array.
9-
Array myIntArray = Array.CreateInstance(typeof(Int32), 5);
9+
Array myIntArray = Array.CreateInstance(typeof(int), 5);
1010

1111
myIntArray.SetValue(8, 0);
1212
myIntArray.SetValue(2, 1);
@@ -18,7 +18,7 @@ public static void Main()
1818
Array.Sort(myIntArray);
1919

2020
// Displays the values of the Array.
21-
Console.WriteLine( "The Int32 array contains the following:" );
21+
Console.WriteLine( "The int array contains the following:" );
2222
PrintValues(myIntArray);
2323

2424
// Locates a specific object that does not exist in the Array.
@@ -65,7 +65,7 @@ public static void PrintValues(Array myArr)
6565
}
6666
// This code produces the following output.
6767
//
68-
//The Int32 array contains the following:
68+
//The int array contains the following:
6969
// 2 3 6 7 8
7070
//The object to search for (1) is not found. The next larger object is at index 0
7171
//

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Copy1 Example/CS/source.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

7-
// Creates and initializes a new Array of type Int32.
7+
// Creates and initializes a new Array of type int.
88
Array myIntArray=Array.CreateInstance( typeof(System.Int32), 5 );
99
for ( int i = myIntArray.GetLowerBound(0); i <= myIntArray.GetUpperBound(0); i++ )
1010
myIntArray.SetValue( i+1, i );
@@ -15,21 +15,21 @@ public static void Main() {
1515
myObjArray.SetValue( i+26, i );
1616

1717
// Displays the initial values of both arrays.
18-
Console.WriteLine( "Int32 array:" );
18+
Console.WriteLine( "int array:" );
1919
PrintValues( myIntArray );
2020
Console.WriteLine( "Object array:" );
2121
PrintValues( myObjArray );
2222

23-
// Copies the first element from the Int32 array to the Object array.
23+
// Copies the first element from the int array to the Object array.
2424
Array.Copy( myIntArray, myIntArray.GetLowerBound(0), myObjArray, myObjArray.GetLowerBound(0), 1 );
2525

26-
// Copies the last two elements from the Object array to the Int32 array.
26+
// Copies the last two elements from the Object array to the int array.
2727
Array.Copy( myObjArray, myObjArray.GetUpperBound(0) - 1, myIntArray, myIntArray.GetUpperBound(0) - 1, 2 );
2828

2929
// Displays the values of the modified arrays.
30-
Console.WriteLine( "Int32 array - Last two elements should now be the same as Object array:" );
30+
Console.WriteLine( "int array - Last two elements should now be the same as Object array:" );
3131
PrintValues( myIntArray );
32-
Console.WriteLine( "Object array - First element should now be the same as Int32 array:" );
32+
Console.WriteLine( "Object array - First element should now be the same as int array:" );
3333
PrintValues( myObjArray );
3434
}
3535

@@ -52,13 +52,13 @@ public static void PrintValues( Array myArr ) {
5252
/*
5353
This code produces the following output.
5454
55-
Int32 array:
55+
int array:
5656
1 2 3 4 5
5757
Object array:
5858
26 27 28 29 30
59-
Int32 array - Last two elements should now be the same as Object array:
59+
int array - Last two elements should now be the same as Object array:
6060
1 2 3 29 30
61-
Object array - First element should now be the same as Int32 array:
61+
Object array - First element should now be the same as int array:
6262
1 27 28 29 30
6363
*/
6464
// </Snippet1>

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ public static void Main()
88
{
99

1010
// Creates and initializes two new Arrays.
11-
Array mySourceArray=Array.CreateInstance(typeof(String), 6);
11+
Array mySourceArray=Array.CreateInstance(typeof(string), 6);
1212
mySourceArray.SetValue("three", 0);
1313
mySourceArray.SetValue("napping", 1);
1414
mySourceArray.SetValue("cats", 2);
1515
mySourceArray.SetValue("in", 3);
1616
mySourceArray.SetValue("the", 4);
1717
mySourceArray.SetValue("barn", 5);
18-
Array myTargetArray=Array.CreateInstance(typeof(String), 15);
18+
Array myTargetArray=Array.CreateInstance(typeof(string), 15);
1919
myTargetArray.SetValue("The", 0);
2020
myTargetArray.SetValue("quick", 1);
2121
myTargetArray.SetValue("brown", 2);

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/CS/source2.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class SamplesArray2
77
public static void Main()
88
{
99
// Creates and initializes the source Array.
10-
Array myArrayZero=Array.CreateInstance(typeof(String), 3);
10+
Array myArrayZero=Array.CreateInstance(typeof(string), 3);
1111
myArrayZero.SetValue("zero", 0);
1212
myArrayZero.SetValue("one", 1);
1313

@@ -18,7 +18,7 @@ public static void Main()
1818
// Creates and initializes the target Array.
1919
int[] myArrLen = { 4 };
2020
int[] myArrLow = { 2 };
21-
Array myArrayTwo=Array.CreateInstance(typeof(String), myArrLen, myArrLow);
21+
Array myArrayTwo=Array.CreateInstance(typeof(string), myArrLen, myArrLow);
2222
myArrayTwo.SetValue("two", 2);
2323
myArrayTwo.SetValue("three", 3);
2424
myArrayTwo.SetValue("four", 4);

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/CS/source.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

7-
// Creates and initializes a one-dimensional Array of type Int32.
8-
Array my1DArray=Array.CreateInstance( typeof(Int32), 5 );
7+
// Creates and initializes a one-dimensional Array of type int.
8+
Array my1DArray=Array.CreateInstance( typeof(int), 5 );
99
for ( int i = my1DArray.GetLowerBound(0); i <= my1DArray.GetUpperBound(0); i++ )
1010
my1DArray.SetValue( i+1, i );
1111

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance1 Example/CS/source.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

7-
// Creates and initializes a two-dimensional Array of type String.
8-
Array my2DArray=Array.CreateInstance( typeof(String), 2, 3 );
7+
// Creates and initializes a two-dimensional Array of type string.
8+
Array my2DArray=Array.CreateInstance( typeof(string), 2, 3 );
99
for ( int i = my2DArray.GetLowerBound(0); i <= my2DArray.GetUpperBound(0); i++ )
1010
for ( int j = my2DArray.GetLowerBound(1); j <= my2DArray.GetUpperBound(1); j++ )
1111
my2DArray.SetValue( "abc" + i + j, i, j );

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/CS/source.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

7-
// Creates and initializes a multidimensional Array of type String.
7+
// Creates and initializes a multidimensional Array of type string.
88
int[] myLengthsArray = new int[4] { 2, 3, 4, 5 };
9-
Array my4DArray=Array.CreateInstance( typeof(String), myLengthsArray );
9+
Array my4DArray=Array.CreateInstance( typeof(string), myLengthsArray );
1010
for ( int i = my4DArray.GetLowerBound(0); i <= my4DArray.GetUpperBound(0); i++ )
1111
for ( int j = my4DArray.GetLowerBound(1); j <= my4DArray.GetUpperBound(1); j++ )
1212
for ( int k = my4DArray.GetLowerBound(2); k <= my4DArray.GetUpperBound(2); k++ )

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance4 Example/CS/source.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

7-
// Creates and initializes a multidimensional Array of type String.
7+
// Creates and initializes a multidimensional Array of type string.
88
int[] myLengthsArray = new int[2] { 3, 5 };
99
int[] myBoundsArray = new int[2] { 2, 3 };
10-
Array myArray=Array.CreateInstance( typeof(String), myLengthsArray, myBoundsArray );
10+
Array myArray=Array.CreateInstance( typeof(string), myLengthsArray, myBoundsArray );
1111
for ( int i = myArray.GetLowerBound(0); i <= myArray.GetUpperBound(0); i++ )
1212
for ( int j = myArray.GetLowerBound(1); j <= myArray.GetUpperBound(1); j++ ) {
1313
int[] myIndicesArray = new int[2] { i, j };

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/CS/source.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
public class Example
44
{
@@ -16,7 +16,7 @@ public static void Main()
1616
Console.WriteLine(" [{0,2}]: {1}", i, strings[i]);
1717

1818
// Search for the first occurrence of the duplicated value.
19-
String searchString = "the";
19+
string searchString = "the";
2020
int index = Array.IndexOf(strings, searchString);
2121
Console.WriteLine("The first occurrence of \"{0}\" is at index {1}.",
2222
searchString, index);

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/CS/source.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using System;
1+
using System;
22
public class SamplesArray {
33

44
public static void Main() {
55

66
// <Snippet1>
77
// Creates and initializes a new Array with three elements of the same value.
8-
Array myArray=Array.CreateInstance( typeof(String), 12 );
8+
Array myArray=Array.CreateInstance( typeof(string), 12 );
99
myArray.SetValue( "the", 0 );
1010
myArray.SetValue( "quick", 1 );
1111
myArray.SetValue( "brown", 2 );
@@ -24,7 +24,7 @@ public static void Main() {
2424
PrintIndexAndValues( myArray );
2525

2626
// Searches for the last occurrence of the duplicated value.
27-
String myString = "the";
27+
string myString = "the";
2828
int myIndex = Array.LastIndexOf( myArray, myString );
2929
Console.WriteLine( "The last occurrence of \"{0}\" is at index {1}.", myString, myIndex );
3030

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

77
// Creates and initializes a new Array.
8-
Array myArray=Array.CreateInstance( typeof(String), 9 );
8+
Array myArray=Array.CreateInstance( typeof(string), 9 );
99
myArray.SetValue( "The", 0 );
1010
myArray.SetValue( "quick", 1 );
1111
myArray.SetValue( "brown", 2 );

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
public class SamplesArray {
44

55
public static void Main() {
66

77
// Creates and initializes a new Array.
8-
Array myArray=Array.CreateInstance( typeof(String), 9 );
8+
Array myArray=Array.CreateInstance( typeof(string), 9 );
99
myArray.SetValue( "The", 0 );
1010
myArray.SetValue( "QUICK", 1 );
1111
myArray.SetValue( "BROWN", 2 );

0 commit comments

Comments
 (0)