Skip to content

Commit 9a22550

Browse files
authored
fix typos (#457)
1 parent 53c9834 commit 9a22550

File tree

3 files changed

+31
-16
lines changed
  • snippets
    • cpp/VS_Snippets_CLR/Generic.LinkedList/cpp
    • csharp/VS_Snippets_CLR/Generic.LinkedList/cs
    • visualbasic/VS_Snippets_CLR/Generic.LinkedList/vb

3 files changed

+31
-16
lines changed

snippets/cpp/VS_Snippets_CLR/Generic.LinkedList/cpp/source.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ref class Example
3333
// </Snippet3>
3434
Display(sentence, "Test 2: Move first node to be last node:");
3535

36-
// Change the last node be 'yesterday'.
36+
// Change the last node to 'yesterday'.
3737
sentence->RemoveLast();
3838
sentence->AddLast("yesterday");
3939
Display(sentence, "Test 3: Change the last node to 'yesterday':");
@@ -48,7 +48,7 @@ public ref class Example
4848

4949

5050
// <Snippet12>
51-
// Indicate, by using parentheisis, the last occurence of 'the'.
51+
// Indicate the last occurence of 'the'.
5252
sentence->RemoveFirst();
5353
LinkedListNode<String^>^ current = sentence->FindLast("the");
5454
// </Snippet12>

snippets/csharp/VS_Snippets_CLR/Generic.LinkedList/cs/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static void Main()
2929
// </Snippet3>
3030
Display(sentence, "Test 2: Move first node to be last node:");
3131

32-
// Change the last node be 'yesterday'.
32+
// Change the last node to 'yesterday'.
3333
sentence.RemoveLast();
3434
sentence.AddLast("yesterday");
3535
Display(sentence, "Test 3: Change the last node to 'yesterday':");
@@ -44,7 +44,7 @@ public static void Main()
4444

4545

4646
// <Snippet12>
47-
// Indicate, by using parentheisis, the last occurence of 'the'.
47+
// Indicate the last occurence of 'the'.
4848
sentence.RemoveFirst();
4949
LinkedListNode<string> current = sentence.FindLast("the");
5050
// </Snippet12>

snippets/visualbasic/VS_Snippets_CLR/Generic.LinkedList/vb/source.vb

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Public Class Example
2424
sentence.AddLast(mark1)
2525
' </Snippet3>
2626
Display(sentence, "Test 2: Move first node to be last node:")
27-
' Change the last node be 'later'.
27+
' Change the last node to 'yesterday'.
2828
sentence.RemoveLast()
29-
sentence.AddLast("later")
30-
Display(sentence, "Test 3: Change the last node to 'later':")
29+
sentence.AddLast("yesterday")
30+
Display(sentence, "Test 3: Change the last node to 'yesterday':")
3131
' <Snippet4>
3232
' Move the last node to be the first node.
3333
mark1 = sentence.Last
@@ -36,7 +36,7 @@ Public Class Example
3636
' </Snippet4>
3737
Display(sentence, "Test 4: Move last node to be first node:")
3838
' <Snippet12>
39-
' Indicate, by using parentheisis, the last occurence of 'the'.
39+
' Indicate the last occurence of 'the'.
4040
sentence.RemoveFirst()
4141
Dim current As LinkedListNode(Of String) = sentence.FindLast("the")
4242
' </Snippet12>
@@ -159,35 +159,50 @@ End Class
159159
'The linked list values:
160160
'the fox jumps over the dog
161161
'Test 1: Add 'today' to beginning of the list:
162-
'today the fox jumps over the dog
162+
'today the fox jumps over the dog
163+
163164
'Test 2: Move first node to be last node:
164-
'the fox jumps over the dog today
165-
'Test 3: Change the last node to 'later':
166-
'the fox jumps over the dog later
165+
'the fox jumps over the dog today
166+
167+
'Test 3: Change the last node to 'yesterday':
168+
'the fox jumps over the dog yesterday
169+
167170
'Test 4: Move last node to be first node:
168-
'later the fox jumps over the dog
171+
'yesterday the fox jumps over the dog
172+
169173
'Test 5: Indicate last occurence of 'the':
170174
'the fox jumps over (the) dog
175+
171176
'Test 6: Add 'lazy' and 'old' after 'the':
172177
'the fox jumps over (the) lazy old dog
178+
173179
'Test 7: Indicate the 'fox' node:
174180
'the (fox) jumps over the lazy old dog
181+
175182
'Test 8: Add 'quick' and 'brown' before 'fox':
176183
'the quick brown (fox) jumps over the lazy old dog
184+
177185
'Test 9: Indicate the 'dog' node:
178186
'the quick brown fox jumps over the lazy old (dog)
187+
179188
'Test 10: Throw exception by adding node (fox) already in the list:
180189
'Exception message: The LinkedList node belongs a LinkedList.
190+
181191
'Test 11: Move a referenced node (fox) before the current node (dog):
182192
'the quick brown jumps over the lazy old fox (dog)
193+
183194
'Test 12: Remove current node (dog) and attempt to indicate it:
184195
'Node 'dog' is not in the list.
196+
185197
'Test 13: Add node removed in test 11 after a referenced node (brown):
186198
'the quick brown (dog) jumps over the lazy old fox
199+
187200
'Test 14: Remove node that has the value 'old':
188201
'the quick brown dog jumps over the lazy fox
202+
189203
'Test 15: Remove last node, cast to ICollection, and add 'rhinoceros':
190-
'the quick brown dog jumps over the lazy rhinoceros
204+
'the quick brown dog jumps over the lazy rhinoceros
205+
191206
'Test 16: Copy the list to an array:
192207
'the
193208
'quick
@@ -198,7 +213,7 @@ End Class
198213
'the
199214
'lazy
200215
'rhinoceros
216+
201217
'Test 17: Clear linked list. Contains 'jumps' = False
202218
'
203-
' </Snippet1>
204-
219+
' </Snippet1>

0 commit comments

Comments
 (0)