all groups > dotnet internationalization > february 2005 >
You're in the

dotnet internationalization

group:

Resource File Manipulation


Resource File Manipulation JezB
2/25/2005 5:30:25 PM
dotnet internationalization:
I have used ResourceWriter and ResourceReader for writing a reading resource
files.

What I want to know is, can I open a resource file in "Append" mode so that
I can read entries from it and add new entries that don't yet exist ?

Or will I have to open a ResourceReader, read and save all the entries in
some collection, then use a ResourceWriter to write these plus any
additional entries to the same file name? Seems very inefficient ....

Re: Resource File Manipulation Guy Smith-Ferrier
2/28/2005 8:57:24 AM
Jez,

You are correct. There is no Append mode. As you say, you have to read all
of the entries in and then add the new ones.

Guy Smith-Ferrier

[quoted text, click to view]

Re: Resource File Manipulation JezB
2/28/2005 11:02:13 AM
OK thanks Guy. I'm worried about performance for large numbers of big
resource files but if this is the only way then so be it !

[quoted text, click to view]

Re: Resource File Manipulation Guy Smith-Ferrier
2/28/2005 1:47:38 PM
Jez,

You will need to make a judgement here but if performance is the most
important issue then you could reject the ResourceReader/ResourceWriter
classes and code the solution another way. I wouldn't recommend this though
and I haven't found their performance warrants bypassing them.

Guy


[quoted text, click to view]

AddThis Social Bookmark Button