I\'m trying to read an embedded text file with System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resource);
but it gives me a Stream
You can read your resource file like this :
Assembly resourceAssembly = Assembly.LoadFrom(resourceFile.FullName);
string[] manifests = resourceAssembly.GetManifestResourceNames();
using (ResourceReader reader = new ResourceReader(
resourceAssembly.GetManifestResourceStream(manifests[0])))
{
foreach (IDictionaryEnumerator dict in reader)
{
string key = dict.Key as string;
object val = dict.Value;
}
}