Skip to content

Commit a2db5c1

Browse files
Names -> Keywords
Replacing full type names with keywords when appropriate Files affected: source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs, source.cs. See dotnet#6920
1 parent 9914215 commit a2db5c1

File tree

17 files changed

+46
-46
lines changed
  • samples/snippets/csharp/VS_Snippets_ADO.NET
    • Classic WebData DataTable.CaseSensitive Example/CS
    • Classic WebData DataTable.LoadDataRow Example/CS
    • Classic WebData DataTable.NewRow Example/CS
    • Classic WebData DataTable.Select2 Example/CS
    • Classic WebData DataTable.ToString Example/CS
    • Classic WebData DataTableCollection.Add1 Example/CS
    • Classic WebData DataTableCollection.Add2 Example/CS
    • Classic WebData DataTableCollection.CollectionChanged Example/CS
    • Classic WebData DataTableCollection.CollectionChanging Example/CS
    • Classic WebData DataTableMapping Example/CS
    • Classic WebData DataTableMapping.ToString Example/CS
    • Classic WebData DataTableMappingCollection Example/CS
    • Classic WebData DataTableMappingCollection.Count Example/CS
    • Classic WebData DataTableMappingCollection.DataTableMappingCollection Example/CS
    • Classic WebData DataTableMappingCollection.this1 Example/CS
    • Classic WebData DataView.RowFilter Example/CS
    • classic webdata datatable example2/cs

17 files changed

+46
-46
lines changed

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTable.CaseSensitive Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -54,7 +54,7 @@ public static DataSet CreateDataSet()
5454
// Add twelve rows
5555
for (int i = 0; i < 10; i++)
5656
{
57-
t.Rows.Add(new object[] { i, i.ToString() });
57+
t.Rows.Add(new object[] { i, i.Tostring() });
5858
}
5959
t.Rows.Add(new object[] { 11, "abc" });
6060
t.Rows.Add(new object[] { 15, "ABC" });

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTable.LoadDataRow Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
using System.Data;
44

@@ -29,7 +29,7 @@ public static void Main() {
2929
row = dt.LoadDataRow(newRow, true);
3030

3131
foreach (DataRow dr in dt.Rows) {
32-
Console.WriteLine(String.Format("Row: {0}, {1}, {2}", dr["col1"], dr["col2"], dr["col3"]));
32+
Console.WriteLine(string.Format("Row: {0}, {1}, {2}", dr["col1"], dr["col2"], dr["col3"]));
3333
}
3434

3535
dt.EndLoadData();

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTable.NewRow Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -37,7 +37,7 @@ private void MakeDataTableAndDisplay()
3737
{
3838
row = table.NewRow();
3939
row["id"] = i;
40-
row["item"] = "item " + i.ToString();
40+
row["item"] = "item " + i.Tostring();
4141
table.Rows.Add(row);
4242
}
4343

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTable.Select2 Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
using System.Data;
44

55
public class A {
66

77
public static void Main() {
88
DataTable table = new DataTable("Orders");
9-
table.Columns.Add("OrderID", typeof(Int32));
10-
table.Columns.Add("OrderQuantity", typeof(Int32));
9+
table.Columns.Add("OrderID", typeof(int));
10+
table.Columns.Add("OrderQuantity", typeof(int));
1111
table.Columns.Add("CompanyName", typeof(string));
1212
table.Columns.Add("Date", typeof(DateTime));
1313

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTable.ToString Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -10,11 +10,11 @@ public class Form1: Form
1010
protected DataGrid dataGrid1;
1111

1212
// <Snippet1>
13-
private void PrintToString(DataSet dataSet)
13+
private void PrintTostring(DataSet dataSet)
1414
{
1515
foreach(DataTable table in dataSet.Tables)
1616
{
17-
Console.WriteLine(table.ToString());
17+
Console.WriteLine(table.Tostring());
1818
}
1919
}
2020
// </Snippet1>

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableCollection.Add1 Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -22,7 +22,7 @@ private void AddTable()
2222
// Code to add columns and rows not shown here.
2323

2424
Console.WriteLine(table.TableName);
25-
Console.WriteLine(thisDataSet.Tables.Count.ToString());
25+
Console.WriteLine(thisDataSet.Tables.Count.Tostring());
2626
}
2727
// </Snippet1>
2828
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableCollection.Add2 Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -18,7 +18,7 @@ private void AddTables()
1818

1919
for (int i = 0; i < 3; i++)
2020
thisDataSet.Tables.Add();
21-
Console.WriteLine(thisDataSet.Tables.Count.ToString()
21+
Console.WriteLine(thisDataSet.Tables.Count.Tostring()
2222
+ " tables");
2323
foreach (DataTable table in thisDataSet.Tables)
2424
Console.WriteLine(table.TableName);

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableCollection.CollectionChanged Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Data;
33
using System.Data.SqlClient;
44
using System.Data.Odbc;
@@ -58,7 +58,7 @@ private static void Collection_Changed(object sender,
5858
System.ComponentModel.CollectionChangeEventArgs e)
5959
{
6060
Console.WriteLine("Collection_Changed Event: '{0}'\table element={1}",
61-
e.Action.ToString(), e.Element.ToString());
61+
e.Action.Tostring(), e.Element.Tostring());
6262
}
6363
// </Snippet1>
6464
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableCollection.CollectionChanging Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Data;
33
using System.Data.SqlClient;
44
using System.Data.Odbc;
@@ -63,7 +63,7 @@ private static void Collection_Changing(object sender,
6363
// catch.
6464

6565
Console.WriteLine("Collection_Changing Event: '{0}'\table element={1}",
66-
e.Action.ToString(), e.Element.ToString());
66+
e.Action.Tostring(), e.Element.Tostring());
6767
}
6868
// </Snippet1>
6969
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableMapping Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -21,7 +21,7 @@ public void AddDataTableMapping()
2121
new DataTableMapping("Categories","DataCategories");
2222
tableMappings.Add((Object) mapping);
2323
Console.WriteLine("Table {0} added to {1} table mapping collection.",
24-
mapping.ToString(), tableMappings.ToString());
24+
mapping.Tostring(), tableMappings.Tostring());
2525
}
2626
// </Snippet1>
2727
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableMapping.ToString Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -20,8 +20,8 @@ public void AddDataTableMapping()
2020
DataTableMapping mapping =
2121
new DataTableMapping("Categories","DataCategories");
2222
mappings.Add((Object) mapping);
23-
Console.WriteLine("Table " + mapping.ToString() + " added to " +
24-
"table mapping collection " + mappings.ToString());
23+
Console.WriteLine("Table " + mapping.Tostring() + " added to " +
24+
"table mapping collection " + mappings.Tostring());
2525
}
2626
// </Snippet1>
2727
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableMappingCollection Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -23,8 +23,8 @@ public void ShowTableMappings()
2323
string message = "Table Mappings:\n";
2424
for(int i=0;i < adapter.TableMappings.Count;i++)
2525
{
26-
message += i.ToString() + " "
27-
+ adapter.TableMappings[i].ToString() + "\n";
26+
message += i.Tostring() + " "
27+
+ adapter.TableMappings[i].Tostring() + "\n";
2828
}
2929
Console.WriteLine(message);
3030
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableMappingCollection.Count Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -20,8 +20,8 @@ public void CreateTableMappings()
2020
string message = "TableMappings:\n";
2121
for(int i=0;i < mappings.Count;i++)
2222
{
23-
message += i.ToString() + " "
24-
+ mappings[i].ToString() + "\n";
23+
message += i.Tostring() + " "
24+
+ mappings[i].Tostring() + "\n";
2525
}
2626
Console.WriteLine(message);
2727
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableMappingCollection.DataTableMappingCollection Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -20,8 +20,8 @@ public void CreateTableMappings()
2020
string message = "TableMappings:\n";
2121
for(int i=0;i < mappings.Count;i++)
2222
{
23-
message += i.ToString() + " "
24-
+ mappings[i].ToString() + "\n";
23+
message += i.Tostring() + " "
24+
+ mappings[i].Tostring() + "\n";
2525
}
2626
Console.WriteLine(message);
2727
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataTableMappingCollection.this1 Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Xml;
33
using System.Data;
44
using System.Data.Common;
@@ -21,8 +21,8 @@ public void FindDataTableMapping()
2121
Console.WriteLine("Error: no such table in collection");
2222
else
2323
Console.WriteLine
24-
("Name: " + mappings["Categories"].ToString() + "\n"
25-
+ "Index: " + mappings.IndexOf("Categories").ToString());
24+
("Name: " + mappings["Categories"].Tostring() + "\n"
25+
+ "Index: " + mappings.IndexOf("Categories").Tostring());
2626
}
2727
// </Snippet1>
2828
}

samples/snippets/csharp/VS_Snippets_ADO.NET/Classic WebData DataView.RowFilter Example/CS/source.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
using System.Data;
44
using System.Windows.Forms;
@@ -52,8 +52,8 @@ private static void DemostrateDataView() {
5252
PrintDataView(dv);
5353

5454
// Removing Sort and RpwFilter to ilustrate RowStateFilter. DataView should contain all 10 rows back in the original order
55-
dv.Sort = String.Empty;
56-
dv.RowFilter = String.Empty;
55+
dv.Sort = string.Empty;
56+
dv.RowFilter = string.Empty;
5757

5858
// Show only Unchanged rows or last 5 rows
5959
dv.RowStateFilter = DataViewRowState.Unchanged;

samples/snippets/csharp/VS_Snippets_ADO.NET/classic webdata datatable example2/cs/source.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <Snippet1>
1+
// <Snippet1>
22
using System;
33
using System.Data;
44

@@ -62,7 +62,7 @@ private static DataTable CreateOrderTable() {
6262
DataTable orderTable = new DataTable("Order");
6363

6464
// Define one column.
65-
DataColumn colId = new DataColumn("OrderId", typeof(String));
65+
DataColumn colId = new DataColumn("OrderId", typeof(string));
6666
orderTable.Columns.Add(colId);
6767

6868
DataColumn colDate = new DataColumn("OrderDate", typeof(DateTime));
@@ -79,11 +79,11 @@ private static DataTable CreateOrderDetailTable() {
7979

8080
// Define all the columns once.
8181
DataColumn[] cols ={
82-
new DataColumn("OrderDetailId",typeof(Int32)),
83-
new DataColumn("OrderId",typeof(String)),
84-
new DataColumn("Product",typeof(String)),
82+
new DataColumn("OrderDetailId",typeof(int)),
83+
new DataColumn("OrderId",typeof(string)),
84+
new DataColumn("Product",typeof(string)),
8585
new DataColumn("UnitPrice",typeof(Decimal)),
86-
new DataColumn("OrderQty",typeof(Int32)),
86+
new DataColumn("OrderQty",typeof(int)),
8787
new DataColumn("LineTotal",typeof(Decimal),"UnitPrice*OrderQty")
8888
};
8989

0 commit comments

Comments
 (0)