Embedded Resources problem

DimkaNewtown

Freshman
Joined
Jan 21, 2003
Messages
43
Location
New York City
Okay,

I have an XML file marked as an embedded resource in my project. I can access the data using the following code:

C#:
DataSet dsLocal = new DataSet();
            dsLocal.ReadXml( Assembly.GetExecutingAssembly().GetManifestResourceStream("UMIShip.ShipAPIPackages.xml"));
			ShipAPIPackages = dsLocal.Tables[0];

But now, let's say I want to change something and make it persistent for the next time I run my application. I tried writing the stream back to the assembly but apparently it's read-only. :confused:

Little help please... (MSDN isn't helping) :o
 
You can't modify your executable at runtime like this. Embedded resources are read-only. You should consider using an external file instead.
 
Back
Top