Buffer_z Buffer_z - 5 months ago 50
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


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 .