Check out StreamReader()
alain
Marc
using System;
using System.IO;
using System.Reflection;
class Program
{
static void Main()
{
// need to start at an assembly (and optionally, also a Type)
Assembly assembly = typeof(Program).Assembly;
// what do we have access to?
foreach(string name in assembly.GetManifestResourceNames()) {
Console.WriteLine(name);
}
// watch for the default namespace!
const string FOO_NAME = "MyDefaultNamespace.foo.xml";
// open the stream-reader
using(StreamReader reader = new StreamReader(
assembly.GetManifestResourceStream(FOO_NAME))) {
string line;
while ((line = reader.ReadLine()) != null)
{
Console.WriteLine(line);
}
}
}
}
Marc
Alicja.SystemAlicja.Properties.Resources.resources
You could look at ResourceManager.GetStream, but I've never managed to
get it working (meaning: I was happy to simply use an embedded resource
instead...)
Marc
by default the name of the assembly gets prefixed to the name of the
file
To be pedantic, I think it uses the default namespace from the project,
not the assembly name. But the two should usually agree...
How to "convert" byte[] into a stream or
just recreate file from byte[] chain?
If none of the other suggestions are working for you, you can always
create a MemoryStream from a byte[].
Pete
THX
"Peter Duniho" <NpOeS...@nnowslpianmk.com> wrote in message
news:op.t90xc...@petes-computer.local...