Skip to content

Commit 7d4d432

Browse files
authored
Reorganize VB snippets in CLR directory (#11544)
1 parent 888bb64 commit 7d4d432

File tree

1,578 files changed

+3881
-5384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,578 files changed

+3881
-5384
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

snippets/visualbasic/Microsoft.Win32/Registry/Overview/source.vb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@
22
Imports Microsoft.Win32
33

44
Class Reg
5-
5+
66
Public Shared Sub Main()
7-
7+
88
' Create a RegistryKey, which will access the HKEY_USERS
99
' key in the registry of this machine.
1010
Dim rk As RegistryKey = Registry.Users
11-
11+
1212
' Print out the keys.
1313
PrintKeys(rk)
14-
End Sub
15-
14+
End Sub
15+
1616
Shared Sub PrintKeys(rkey As RegistryKey)
17-
17+
1818
' Retrieve all the subkeys for the specified key.
1919
Dim names As String() = rkey.GetSubKeyNames()
20-
20+
2121
Dim icount As Integer = 0
22-
22+
2323
Console.WriteLine("Subkeys of " & rkey.Name)
2424
Console.WriteLine("-----------------------------------------------")
25-
25+
2626
' Print the contents of the array to the console.
2727
Dim s As String
2828
For Each s In names
2929
Console.WriteLine(s)
30-
30+
3131
' The following code puts a limit on the number
3232
' of keys displayed. Comment it out to print the
3333
' complete list.
34-
icount += 1
34+
icount += 1
3535
If icount >= 10 Then
3636
Exit For
3737
End If
3838
Next s
3939
End Sub
4040
End Class
41-
' </Snippet1>
41+
' </Snippet1>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Public Class Example
2424
Registry.SetValue(keyName, "TestExpand2", "My path: %path%", _
2525
RegistryValueKind.ExpandString)
2626

27-
' Arrays of strings are stored automatically as
27+
' Arrays of strings are stored automatically as
2828
' MultiString. Similarly, arrays of Byte are stored
2929
' automatically as Binary.
3030
Dim strings() As String = {"One", "Two", "Three"}
@@ -37,7 +37,7 @@ Public Class Example
3737
"Return this default if NoSuchName does not exist.")
3838
Console.WriteLine(vbCrLf & "NoSuchName: {0}", noSuch)
3939

40-
' Retrieve the Integer and Long values, specifying
40+
' Retrieve the Integer and Long values, specifying
4141
' numeric default values in case the name/value pairs
4242
' do not exist. The Integer value is retrieved from the
4343
' default (nameless) name/value pair for the key.
@@ -93,4 +93,4 @@ End Class
9393
'
9494
'Use the registry editor to examine the key.
9595
'Press the Enter key to delete the key.
96-
'</Snippet1>
96+
'</Snippet1>
File renamed without changes.

0 commit comments

Comments
 (0)