Content deleted Content added
→Visual Basic: copy editing |
→Visual Basic .NET: copy editing |
||
Line 1,880:
</syntaxhighlight>
===
[[Visual Basic .NET]] uses the collection classes provided by the [[.NET Framework]].
====Creation====
The following code demonstrates the creation and population of a dictionary
▲The following code demonstrates the creation and population of a dictionary. See [[#C#|the C# example on this page]] for additional information.
<syntaxhighlight lang=VBNet>
Dim dic As New System.Collections.Generic.Dictionary(Of String, String)
Line 1,893:
</syntaxhighlight>
An
<syntaxhighlight lang=VBNet>
Dim dic As New System.Collections.Dictionary(Of String, String) From {
Line 1,903 ⟶ 1,904:
====Access by key====
▲Example demonstrating access; see [[#C# access|this section of the C# example]] for explanation:
<syntaxhighlight lang=VBNet>
Dim sallyNumber = dic("Sally Smart")
Line 1,916 ⟶ 1,917:
====Enumeration====
Example demonstrating enumeration
▲Example demonstrating enumeration; see [[#C# enumeration|this section of the C# example]] for explanation:
<syntaxhighlight lang=VBNet>
' loop through the collection and display each entry.
|