.NET ResourceWriter.AddResource() cannot append items to existing resource file, is that true?

  • Thread starter Thread starter msnews.microsoft.com
  • Start date Start date
M

msnews.microsoft.com

Hi,

I am trying to use below code to write .NET resource files. What I am
expecting is to append items to an exsiting file. But any time below code
just remove exsting items and just write the new items into the file.

Could any people help achieve my simple objective? Any info will be
appreciated, thanks a lot!

--------------------------------

private void WriteRes()

{

IResourceWriter rw = new
ResourceWriter(@"C:\develop\try_ResMgr\ResMgr\MyResources\MyResource.resourc
es");

rw.AddResource("First", "Mercury");

rw2.Generate();

rw2.Close();

}

----------------------------------

By the way, I read a sample app of writing resource files. Whenever it wants
to write something, it always read all existing items, and then write all
items including both new and existing old items into the file again.

Should I necessarily do this as well?



Thanks!

LLI
 
Back
Top