Skip to content

Commit 0674065

Browse files
author
Ron Petrusha
authored
Merge pull request #143 from majikandy/string_builder_variable_name
Variable name MyStringBuilder -> myStringbuilder
2 parents 55dac98 + 4810ec9 commit 0674065

File tree

3 files changed

+54
-54
lines changed
  • snippets
    • cpp/VS_Snippets_CLR/Conceptual.StringBuilder/cpp
    • csharp/VS_Snippets_CLR/Conceptual.StringBuilder/cs
    • visualbasic/VS_Snippets_CLR/Conceptual.StringBuilder/vb

3 files changed

+54
-54
lines changed

snippets/cpp/VS_Snippets_CLR/Conceptual.StringBuilder/cpp/example.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,26 @@ public ref class Example
2222
static void InstantiateStringBuilder()
2323
{
2424
// <Snippet1>
25-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Hello World!");
25+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Hello World!");
2626
// </Snippet1>
2727
}
2828

2929
static void InstantiateWithCapacity()
3030
{
3131
// <Snippet2>
32-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Hello World!", 25);
32+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Hello World!", 25);
3333
// </Snippet2>
3434
// <Snippet3>
35-
MyStringBuilder->Capacity = 25;
35+
myStringBuilder->Capacity = 25;
3636
// </Snippet3>
3737
}
3838

3939
static void Appending()
4040
{
4141
// <Snippet4>
42-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Hello World!");
43-
MyStringBuilder->Append(" What a beautiful day.");
44-
Console::WriteLine(MyStringBuilder);
42+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Hello World!");
43+
myStringBuilder->Append(" What a beautiful day.");
44+
Console::WriteLine(myStringBuilder);
4545
// The example displays the following output:
4646
// Hello World! What a beautiful day.
4747
// </Snippet4>
@@ -51,9 +51,9 @@ public ref class Example
5151
{
5252
// <Snippet5>
5353
int MyInt = 25;
54-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Your total is ");
55-
MyStringBuilder->AppendFormat("{0:C} ", MyInt);
56-
Console::WriteLine(MyStringBuilder);
54+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Your total is ");
55+
myStringBuilder->AppendFormat("{0:C} ", MyInt);
56+
Console::WriteLine(myStringBuilder);
5757
// The example displays the following output:
5858
// Your total is $25.00
5959
// </Snippet5>
@@ -62,9 +62,9 @@ public ref class Example
6262
static void Inserting()
6363
{
6464
// <Snippet6>
65-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Hello World!");
66-
MyStringBuilder->Insert(6,"Beautiful ");
67-
Console::WriteLine(MyStringBuilder);
65+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Hello World!");
66+
myStringBuilder->Insert(6,"Beautiful ");
67+
Console::WriteLine(myStringBuilder);
6868
// The example displays the following output:
6969
// Hello Beautiful World!
7070
// </Snippet6>
@@ -73,9 +73,9 @@ public ref class Example
7373
static void Removing()
7474
{
7575
// <Snippet7>
76-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Hello World!");
77-
MyStringBuilder->Remove(5,7);
78-
Console::WriteLine(MyStringBuilder);
76+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Hello World!");
77+
myStringBuilder->Remove(5,7);
78+
Console::WriteLine(myStringBuilder);
7979
// The example displays the following output:
8080
// Hello
8181
// </Snippet7>
@@ -84,9 +84,9 @@ public ref class Example
8484
static void Replacing()
8585
{
8686
// <Snippet8>
87-
StringBuilder^ MyStringBuilder = gcnew StringBuilder("Hello World!");
88-
MyStringBuilder->Replace('!', '?');
89-
Console::WriteLine(MyStringBuilder);
87+
StringBuilder^ myStringBuilder = gcnew StringBuilder("Hello World!");
88+
myStringBuilder->Replace('!', '?');
89+
Console::WriteLine(myStringBuilder);
9090
// The example displays the following output:
9191
// Hello World?
9292
// </Snippet8>

snippets/csharp/VS_Snippets_CLR/Conceptual.StringBuilder/cs/Example.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ public static void Main()
2020
private static void InstantiateStringBuilder()
2121
{
2222
// <Snippet1>
23-
StringBuilder MyStringBuilder = new StringBuilder("Hello World!");
23+
StringBuilder myStringBuilder = new StringBuilder("Hello World!");
2424
// </Snippet1>
2525
}
2626

2727
private static void InstantiateWithCapacity()
2828
{
2929
// <Snippet2>
30-
StringBuilder MyStringBuilder = new StringBuilder("Hello World!", 25);
30+
StringBuilder myStringBuilder = new StringBuilder("Hello World!", 25);
3131
// </Snippet2>
3232
// <Snippet3>
33-
MyStringBuilder.Capacity = 25;
33+
myStringBuilder.Capacity = 25;
3434
// </Snippet3>
3535
}
3636

3737
private static void Appending()
3838
{
3939
// <Snippet4>
40-
StringBuilder MyStringBuilder = new StringBuilder("Hello World!");
41-
MyStringBuilder.Append(" What a beautiful day.");
42-
Console.WriteLine(MyStringBuilder);
40+
StringBuilder myStringBuilder = new StringBuilder("Hello World!");
41+
myStringBuilder.Append(" What a beautiful day.");
42+
Console.WriteLine(myStringBuilder);
4343
// The example displays the following output:
4444
// Hello World! What a beautiful day.
4545
// </Snippet4>
@@ -49,9 +49,9 @@ private static void AppendingFormat()
4949
{
5050
// <Snippet5>
5151
int MyInt = 25;
52-
StringBuilder MyStringBuilder = new StringBuilder("Your total is ");
53-
MyStringBuilder.AppendFormat("{0:C} ", MyInt);
54-
Console.WriteLine(MyStringBuilder);
52+
StringBuilder myStringBuilder = new StringBuilder("Your total is ");
53+
myStringBuilder.AppendFormat("{0:C} ", MyInt);
54+
Console.WriteLine(myStringBuilder);
5555
// The example displays the following output:
5656
// Your total is $25.00
5757
// </Snippet5>
@@ -60,9 +60,9 @@ private static void AppendingFormat()
6060
private static void Inserting()
6161
{
6262
// <Snippet6>
63-
StringBuilder MyStringBuilder = new StringBuilder("Hello World!");
64-
MyStringBuilder.Insert(6,"Beautiful ");
65-
Console.WriteLine(MyStringBuilder);
63+
StringBuilder myStringBuilder = new StringBuilder("Hello World!");
64+
myStringBuilder.Insert(6,"Beautiful ");
65+
Console.WriteLine(myStringBuilder);
6666
// The example displays the following output:
6767
// Hello Beautiful World!
6868
// </Snippet6>
@@ -71,9 +71,9 @@ private static void Inserting()
7171
private static void Removing()
7272
{
7373
// <Snippet7>
74-
StringBuilder MyStringBuilder = new StringBuilder("Hello World!");
75-
MyStringBuilder.Remove(5,7);
76-
Console.WriteLine(MyStringBuilder);
74+
StringBuilder myStringBuilder = new StringBuilder("Hello World!");
75+
myStringBuilder.Remove(5,7);
76+
Console.WriteLine(myStringBuilder);
7777
// The example displays the following output:
7878
// Hello
7979
// </Snippet7>
@@ -82,9 +82,9 @@ private static void Removing()
8282
private static void Replacing()
8383
{
8484
// <Snippet8>
85-
StringBuilder MyStringBuilder = new StringBuilder("Hello World!");
86-
MyStringBuilder.Replace('!', '?');
87-
Console.WriteLine(MyStringBuilder);
85+
StringBuilder myStringBuilder = new StringBuilder("Hello World!");
86+
myStringBuilder.Replace('!', '?');
87+
Console.WriteLine(myStringBuilder);
8888
// The example displays the following output:
8989
// Hello World?
9090
// </Snippet8>

snippets/visualbasic/VS_Snippets_CLR/Conceptual.StringBuilder/vb/Example.vb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ Module Example
1919

2020
Private Sub InstantiateStringBuilder()
2121
' <Snippet1>
22-
Dim MyStringBuilder As New StringBuilder("Hello World!")
22+
Dim myStringBuilder As New StringBuilder("Hello World!")
2323
' </Snippet1>
2424
End Sub
2525

2626
Private Sub InstantiateWithCapacity()
2727
' <Snippet2>
28-
Dim MyStringBuilder As New StringBuilder("Hello World!", 25)
28+
Dim myStringBuilder As New StringBuilder("Hello World!", 25)
2929
' </Snippet2>
3030
' <Snippet3>
31-
MyStringBuilder.Capacity = 25
31+
myStringBuilder.Capacity = 25
3232
' </Snippet3>
3333
End Sub
3434

3535
Private Sub Appending()
3636
' <Snippet4>
37-
Dim MyStringBuilder As New StringBuilder("Hello World!")
38-
MyStringBuilder.Append(" What a beautiful day.")
39-
Console.WriteLine(MyStringBuilder)
37+
Dim myStringBuilder As New StringBuilder("Hello World!")
38+
myStringBuilder.Append(" What a beautiful day.")
39+
Console.WriteLine(myStringBuilder)
4040
' The example displays the following output:
4141
' Hello World! What a beautiful day.
4242
' </Snippet4>
@@ -45,39 +45,39 @@ Module Example
4545
Private Sub AppendingFormat()
4646
' <Snippet5>
4747
Dim MyInt As Integer = 25
48-
Dim MyStringBuilder As New StringBuilder("Your total is ")
49-
MyStringBuilder.AppendFormat("{0:C} ", MyInt)
50-
Console.WriteLine(MyStringBuilder)
48+
Dim myStringBuilder As New StringBuilder("Your total is ")
49+
myStringBuilder.AppendFormat("{0:C} ", MyInt)
50+
Console.WriteLine(myStringBuilder)
5151
' The example displays the following output:
5252
' Your total is $25.00
5353
' </Snippet5>
5454
End Sub
5555

5656
Private Sub Inserting()
5757
' <Snippet6>
58-
Dim MyStringBuilder As New StringBuilder("Hello World!")
59-
MyStringBuilder.Insert(6, "Beautiful ")
60-
Console.WriteLine(MyStringBuilder)
58+
Dim myStringBuilder As New StringBuilder("Hello World!")
59+
myStringBuilder.Insert(6, "Beautiful ")
60+
Console.WriteLine(myStringBuilder)
6161
' The example displays the following output:
6262
' Hello Beautiful World!
6363
' </Snippet6>
6464
End Sub
6565

6666
Private Sub Removing()
6767
' <Snippet7>
68-
Dim MyStringBuilder As New StringBuilder("Hello World!")
69-
MyStringBuilder.Remove(5, 7)
70-
Console.WriteLine(MyStringBuilder)
68+
Dim myStringBuilder As New StringBuilder("Hello World!")
69+
myStringBuilder.Remove(5, 7)
70+
Console.WriteLine(myStringBuilder)
7171
' The example displays the following output:
7272
' Hello
7373
' </Snippet7>
7474
End Sub
7575

7676
Private Sub Replacing()
7777
' <Snippet8>
78-
Dim MyStringBuilder As New StringBuilder("Hello World!")
79-
MyStringBuilder.Replace("!"c, "?"c)
80-
Console.WriteLine(MyStringBuilder)
78+
Dim myStringBuilder As New StringBuilder("Hello World!")
79+
myStringBuilder.Replace("!"c, "?"c)
80+
Console.WriteLine(myStringBuilder)
8181
' The example displays the following output:
8282
' Hello World?
8383
' </Snippet8>

0 commit comments

Comments
 (0)