Mega Code Archive

 
Categories / VB.Net / Data Structure
 

To get the values, use the Values property

Imports System Imports System.Collections.Generic Public Class Example     Public Shared Sub Main()          Dim openWith As New Dictionary(Of String, String)         openWith.Add("A", "a")         openWith.Add("B", "b")         openWith.Add("C", "c")         openWith.Add("D", "d")         Dim valueColl As Dictionary(Of String, String).ValueCollection = openWith.Values         For Each s As String In  valueColl             Console.WriteLine("Value = {0}", s)         Next s     End Sub End Class