Skip to content

Commit 8a42ade

Browse files
Names -> Keywords
Replacing full type names with keywords when appropriate Files affected: PixelFormatsExample.cs, Window1.xaml.cs, mainwindow.xaml.cs, DataSource.cs, PackageDigitalSignature.cs, GetStringPageFunction.xaml.cs, GetStringPageFunctionCaller.xaml.cs, data.cs, Window1.xaml.cs, Window1.xaml.cs, Window1.xaml.cs, PointExample.cs. See dotnet#6920
1 parent 9914215 commit 8a42ade

File tree

12 files changed

+34
-34
lines changed

12 files changed

+34
-34
lines changed

samples/snippets/csharp/VS_Snippets_Wpf/ImagingSnippetGallery_procedural_snip/CSharp/PixelFormatsExample.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.Windows;
33
using System.Windows.Controls;
44
using System.Windows.Media;
@@ -86,7 +86,7 @@ public PixelFormat createPixelFormat()
8686
IList<PixelFormatChannelMask> myChannelMaskCollection = myPixelFormat.Masks;
8787

8888
// Capture the mask info in a string.
89-
String stringOfValues = " ";
89+
string stringOfValues = " ";
9090
foreach (PixelFormatChannelMask myMask in myChannelMaskCollection)
9191
{
9292
IList<byte> myBytesCollection = myMask.Mask;

samples/snippets/csharp/VS_Snippets_Wpf/ImplementICommandSource/CSharp/Window1.xaml.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.Windows;
33
using System.Windows.Controls;
44
using System.Windows.Data;
@@ -127,7 +127,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
127127

128128
try
129129
{
130-
intFont = Int32.Parse(fontSize);
130+
intFont = int.Parse(fontSize);
131131
return intFont;
132132
}
133133
catch (FormatException e)

samples/snippets/csharp/VS_Snippets_Wpf/ObservableCollection_snip/CSharp/DataSource.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.ComponentModel;
33
using System.Windows;
44
using System.Windows.Controls;
@@ -43,7 +43,7 @@ public int NLValue
4343
// The following variable and method provide the support for
4444
// handling property changed events.
4545
public event PropertyChangedEventHandler PropertyChanged;
46-
private void OnPropertyChanged(String info)
46+
private void OnPropertyChanged(string info)
4747
{
4848
if (PropertyChanged != null)
4949
PropertyChanged(this, new PropertyChangedEventArgs(info));

samples/snippets/csharp/VS_Snippets_Wpf/PackageDigitalSignature/CSharp/PackageDigitalSignature.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// PackageDigitalSignature SDK Sample - PackageDigitalSignature.cs
1+
// PackageDigitalSignature SDK Sample - PackageDigitalSignature.cs
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33

44
using System;
@@ -56,7 +56,7 @@ public static void Main()
5656
/// content and resource files.</summary>
5757
/// <param name="packageFilename">
5858
/// The filename of the Package to create.</param>
59-
private static void CreatePackage(String packageFilename)
59+
private static void CreatePackage(string packageFilename)
6060
{
6161
// Create URIs for the parts that will be added to the Package.
6262
Uri uriDocument = new Uri(@"Content\Document.xml", UriKind.Relative);

samples/snippets/csharp/VS_Snippets_Wpf/PageFunctionMembersSnippets/CSharp/GetStringPageFunction.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System;
1+
using System;
22
using System.Windows;
33
using System.Windows.Navigation;
44

55
namespace CSharp
66
{
7-
public partial class GetStringPageFunction : PageFunction<String>
7+
public partial class GetStringPageFunction : PageFunction<string>
88
{
99
public GetStringPageFunction()
1010
{
@@ -27,7 +27,7 @@ protected override void Start()
2727
void doneButton_Click(object sender, RoutedEventArgs e)
2828
{
2929
// Complete the page function and return data of type T
30-
OnReturn(new ReturnEventArgs<String>(this.pageFunctionData.Text));
30+
OnReturn(new ReturnEventArgs<string>(this.pageFunctionData.Text));
3131
}
3232
//</SnippetCallOnReturnCODE>
3333
}

samples/snippets/csharp/VS_Snippets_Wpf/PageFunctionMembersSnippets/CSharp/GetStringPageFunctionCaller.xaml.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.Windows;
33
using System.Windows.Controls;
44
using System.Windows.Navigation;
@@ -19,13 +19,13 @@ void callPageFunctionButton_Click(object sender, RoutedEventArgs e)
1919
GetStringPageFunction pageFunction = new GetStringPageFunction();
2020

2121
// Detect when page function returns
22-
pageFunction.Return += new ReturnEventHandler<String>(PageFunction_Return);
22+
pageFunction.Return += new ReturnEventHandler<string>(PageFunction_Return);
2323

2424
// Call page function
2525
this.NavigationService.Navigate(pageFunction);
2626
}
2727

28-
void PageFunction_Return(object sender, ReturnEventArgs<String> e)
28+
void PageFunction_Return(object sender, ReturnEventArgs<string> e)
2929
{
3030
// Retrieve page function return value
3131
string returnValue = e.Result;

samples/snippets/csharp/VS_Snippets_Wpf/PhotoStoreDemoStyled/CS/data.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.Collections.Generic;
33
using System.Text;
44
using System.IO;
@@ -79,7 +79,7 @@ public override string ToString()
7979
}
8080

8181
private string _description;
82-
public String Description { get { return _description; } }
82+
public string Description { get { return _description; } }
8383

8484
private double _cost;
8585
public double Cost { get { return _cost; } }
@@ -128,7 +128,7 @@ public int Quantity
128128
}
129129

130130
public event PropertyChangedEventHandler PropertyChanged;
131-
private void OnPropertyChanged(String info)
131+
private void OnPropertyChanged(string info)
132132
{
133133
if (PropertyChanged != null)
134134
PropertyChanged(this, new PropertyChangedEventArgs(info));

samples/snippets/csharp/VS_Snippets_Wpf/Point3DSample/CSharp/Window1.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//This is a list of commonly used namespaces for a window.
1+
//This is a list of commonly used namespaces for a window.
22
using System;
33
using System.Windows;
44
using System.Windows.Controls;
@@ -31,7 +31,7 @@ private void PerformOperation(object sender, RoutedEventArgs e)
3131
RadioButton li = (sender as RadioButton);
3232

3333
// Strings used to display the results
34-
String syntaxString, resultType, operationString;
34+
string syntaxString, resultType, operationString;
3535

3636
// The local variables point1, point2, vector2, etc are defined in each
3737
// case block for readability reasons. Each variable is contained within
@@ -386,7 +386,7 @@ private void PerformOperation(object sender, RoutedEventArgs e)
386386
//</SnippetMil3DPoints3DN2>
387387

388388
// Displays the results of the operation
389-
private void ShowResults(String resultValue, String syntax, String resultType, String opString)
389+
private void ShowResults(string resultValue, string syntax, string resultType, string opString)
390390
{
391391

392392
txtResultValue.Text = resultValue;

samples/snippets/csharp/VS_Snippets_Wpf/Point4DSample/CSharp/Window1.xaml.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//This is a list of commonly used namespaces for a window.
1+
//This is a list of commonly used namespaces for a window.
22
using System;
33
using System.Windows;
44
using System.Windows.Controls;
@@ -32,7 +32,7 @@ private void PerformOperation(object sender, System.Windows.RoutedEventArgs e)
3232
RadioButton li = (sender as RadioButton);
3333

3434
// Strings used to display the results
35-
String syntaxString, resultType, operationString;
35+
string syntaxString, resultType, operationString;
3636

3737
// The local variables point1, point2, vector2, etc are defined in each
3838
// case block for readability reasons. Each variable is contained within
@@ -307,14 +307,14 @@ private void PerformOperation(object sender, System.Windows.RoutedEventArgs e)
307307
//<SnippetMil4DPoints3DN15>
308308
// Gets a string representation of the structure
309309
Point4D point1 = new Point4D(10, 5, 1, 4);
310-
String pointString;
310+
string pointString;
311311

312312
pointString = point1.ToString();
313313
// matrixString is equal to 10, 5, 1, 4
314314

315315
// Displaying Results
316316
syntaxString = "pointString = point1.ToString();";
317-
resultType = "String";
317+
resultType = "string";
318318
operationString = "Getting the string representation of a Point4D";
319319
ShowResults(pointString.ToString(), syntaxString, resultType, operationString);
320320
//</SnippetMil4DPoints3DN15>
@@ -352,7 +352,7 @@ private void PerformOperation(object sender, System.Windows.RoutedEventArgs e)
352352
// result variables
353353
Boolean areEqual;
354354
Boolean areNotEqual;
355-
String stringResult;
355+
string stringResult;
356356

357357
// defining x,y,z of point1
358358
point4D1.X = 10;
@@ -396,7 +396,7 @@ private void PerformOperation(object sender, System.Windows.RoutedEventArgs e)
396396

397397
//</SnippetMil4DPoints3DN2>
398398
// Displays the results of the operation
399-
private void ShowResults(String resultValue, String syntax, String resultType, String opString)
399+
private void ShowResults(string resultValue, string syntax, string resultType, string opString)
400400
{
401401

402402
txtResultValue.Text = resultValue;

samples/snippets/csharp/VS_Snippets_Wpf/PointCollection/CSharp/Window1.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//This is a list of commonly used namespaces for a window.
1+
//This is a list of commonly used namespaces for a window.
22
using System;
33
using System.Windows;
44
using System.Windows.Controls;
@@ -28,7 +28,7 @@ private void PointCollectionOperations(object sender, SelectionChangedEventArgs
2828
RadioButton li = (sender as RadioButton);
2929

3030
// Strings used to display the results
31-
String syntaxString, resultType, operationString;
31+
string syntaxString, resultType, operationString;
3232

3333
// The local variables point1, point2, vector2, etc are defined in each
3434
// case block for readability reasons. Each variable is contained within
@@ -299,7 +299,7 @@ private void PointCollectionOperations(object sender, SelectionChangedEventArgs
299299
} //end switch
300300
}
301301

302-
private void ShowResults(String resultValue, String syntax, String resultType, String opString)
302+
private void ShowResults(string resultValue, string syntax, string resultType, string opString)
303303
{
304304
}
305305
}

samples/snippets/csharp/VS_Snippets_Wpf/PointExamples_snip/CSharp/PointExample.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.Windows;
33
using System.Windows.Controls;
44
using System.Windows.Documents;
@@ -367,14 +367,14 @@ private Vector subtractExample2()
367367
// </SnippetSubtractExample2>
368368

369369
// <SnippetToStringExample>
370-
private String toStringExample()
370+
private string toStringExample()
371371
{
372372

373373
Point point1 = new Point(10, 5);
374374

375375
// Get a string representation of a Point structure.
376376
// pointString is equal to 10,5 .
377-
String stringResult = point1.ToString();
377+
string stringResult = point1.ToString();
378378

379379
return stringResult;
380380
}

samples/snippets/csharp/VS_Snippets_Wpf/inputcommandbinding/csharp/mainwindow.xaml.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.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -52,7 +52,7 @@ private void ChangeColor(object colorString)
5252
}
5353

5454
Color newColor =
55-
(Color)ColorConverter.ConvertFromString((String)colorString);
55+
(Color)ColorConverter.ConvertFromString((string)colorString);
5656

5757
alternateColor = new SolidColorBrush(newColor);
5858

0 commit comments

Comments
 (0)