Hi,
I made a window application in which I put some images, some xml files and some strings in Property.Resources as embedded resources. during run time with the help of Assembly ( using reflection ) I try to access the property which are only of corresponding to xml files so that I can fill my combobox with the Name of the properties which are only related to xml files.
Thanks in advance...
Plz help
Bechir BejaouiRank #144 · 15.9K pointsPosted May 24, 2008, 11:52 PM EDT
public static void Retrieve(string resPathName) { try { //Create a new ResXResource reader and set the resx path to resxPathName ResourceReader resReader = new ResourceReader(resPathName); //Enumerate the elements within the resx file and dispaly them foreach (DictionaryEntry d in resReader) { MessageBox.Show(d.Key.ToString() + “ : “ + d.Value.ToString()); } //Close the resxReader resReader.Close(); MessageBox.Show(“Done”); } //If the resx file represents some incoherences catch (ArgumentException caught) { MessageBox.Show(“Source: “ + caught.Source + “Message: “ + caught.Message); }