How can iterate in Dictionary in vb.net?

Make Integer as key for your Dictionary:

Dim ImageCollection As New Dictionary(Of Integer, ConvensionImages)

Change ImageCollection.Add(obj, key) to ImageCollection.Add(key, obj)

And use this loop:

For Each kvp As KeyValuePair(Of Integer, ConvensionImages) In ImageCollection
     Dim v1 As Integer = kvp.Key  
     Dim v2 As ConvensionImages = kvp.Value  
     'Do whatever you want with v2:
     'If v2.ImageID = .... Then
Next  

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)