Imports System.Collections
Imports System
Imports System.Resources
Imports System.Drawing
Module Module1
Sub Main()
Dim RwX As New ResXResourceWriter("my.resx")
Dim RrX As ResXResourceReader
Dim RrXEn As IDictionaryEnumerator
RwX.AddResource("key 1", "First value")
RwX.AddResource("key 2", "Second value")
RwX.AddResource("key 3", "Third value")
Dim img = Image.FromFile("a.jpg")
RwX.AddResource("crane", img)
RwX.Generate()
RwX.Close()
RrX = New ResXResourceReader("my.resx")
RrXEn = RrX.GetEnumerator
Do While (RrXEn.MoveNext)
Console.WriteLine("Name: {0} - Value: {1}", RrXEn.Key.ToString().PadRight(10, " "c), RrXEn.Value)
Loop
RrX.Close()
End Sub
End Module