Hi all,
I've begun playing with resources in .NET. Makes sense so far getting to the resources via the My.Resources namespace, but I have a question about looping through all my resources that are stored in the default Resources.resx file.
Let's say, just for example, I have multiple icons in there and I want the user to select one for some reason at runtime. I have figured out that I can loop through them like this, but is there a more "VB 2005 way"? Is there some way to do this using the My.Resources namespace?
vb.net Code:
Dim assem As Assembly = Assembly.GetExecutingAssembly() Dim rr As New ResourceReader(assem.GetManifestResourceStream("MyApplication.Resources.resources")) Dim de As IDictionaryEnumerator = rr.GetEnumerator() Do While de.MoveNext() ' Do something. Loop




Reply With Quote