J
Jeronimo Bertran
Hello ,
I am trying to read a resource in my .net app using a stream. I found the
GetMainfestResourceStream but I am having trouble using it with the
resources I edit with the resource editor. I added an icon named
Devices.ico which I need to read as a stream....
I am able to load the resource using the ResourceManager as follows:
Assembly assembly = Assembly.GetExecutingAssembly();
ResourceManager rm = new ResourceManager ("Namespace.Properties.Resources",
assembly);
// This works ok
myObj = rm.GetObject("Devices");
Stream reader = assembly.GetManifestResourceStream
("Namespace.Properties.Resources.Devices.ico");
returns a null stream... I also tried with no extension.
Thanks,
Jeronimo
I am trying to read a resource in my .net app using a stream. I found the
GetMainfestResourceStream but I am having trouble using it with the
resources I edit with the resource editor. I added an icon named
Devices.ico which I need to read as a stream....
I am able to load the resource using the ResourceManager as follows:
Assembly assembly = Assembly.GetExecutingAssembly();
ResourceManager rm = new ResourceManager ("Namespace.Properties.Resources",
assembly);
// This works ok
myObj = rm.GetObject("Devices");
Stream reader = assembly.GetManifestResourceStream
("Namespace.Properties.Resources.Devices.ico");
returns a null stream... I also tried with no extension.
Thanks,
Jeronimo