Hello,
I included some xml files to my project as resource...How can I load
them at
run time??
In Project-Explorer click on the xml file and set (under properties)
Buildaction="Embedded ressource".
So the file will be embedded in the assembly.
The call at runtime is i.e. :
Assembly thisExe = Assembly.GetExecutingAssembly(*);
Stream file=
thisExe.GetManifestResourceStr*eam("myAssemblyName .myXmlFile.xml");
textBoxXML.AppendText(new StreamReader(file).ReadToEnd()*);
file.Close();
In some cases the StreamReader.Read should be with Encoding.Default.
ciao Frank
--
Dipl.Inf. Frank Dzaebel [MCP C#]
http://Dzaebel.NET