Get length of a Dictionary
Posted
by
StealthRT
on Stack Overflow
See other posts from Stack Overflow
or by StealthRT
Published on 2012-11-11T04:55:23Z
Indexed on
2012/11/11
5:00 UTC
Read the original article
Hit count: 100
Hey all i am new at this Dictionary class in VB.net.
I am wanting to reteive how many items in the Dictionary array there are:
But doing this:
Dim showNumber As Integer = tmpShows.Length
Does not seem to yield 4 as it should?
The code for the Dictionary i have is this:
Dim all = New Dictionary(Of String, Object)()
Dim info = New Dictionary(Of String, Object)()
info!Station = .SelectSingleNode(".//span[@class='channel']").ChildNodes(3).ChildNodes(2).InnerText
info!Shows = From tag In .SelectNodes(".//a[@class='thickbox']")
Select New With {.Show = tag.Attributes("title").Value, .Link = tag.Attributes("href").Value}
Dim tmpShows = all.Item(info!Station)
Dim showNumber As Integer = tmpShows.Length
What am i missing in order to get the 4 length i am looking for?
© Stack Overflow or respective owner