Buffer_z Buffer_z - 1 year ago 147
C# Question

C# create resources programmatically

I've been researching for a method to add a resource programmatically.

Basically I'm reading some values from a memory mapped file. I want to be able to create a resource string to store the values read.

For example:

MemoryMappedFile mmf = MemoryMappedFile.OpenExisting("test");

using (MemoryMappedViewAccessor accessor = mmf.CreateViewAccessor())
Byte[] buffer = new Byte[1024];
accessor.ReadArray<byte>(0, buffer, 0, buffer.Length);
String S = Encoding.Default.GetString(buffer);

I want to be able to put that string into a resource file

Answer Source

what i wanted exactly is to store data somewhere instead of file or a Database , because it was only an ID so i solved it by storing it on a Registrey Key on the current user so it won't need any admin privilieges .

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download