[Mono-devel-list] resources

Lee Mallabone mono-docs at fonicmonkey.net
Fri Mar 7 03:50:25 EST 2003


I'm trying to get a resource string from the same assembly that my class
is defined in. This is with a view to implementing some CultureInfo
stuff in corlib.

I converted a string table to a resource with monoresgen, and embedded
it in my test assembly. I think the following lines should be fine to
retrieve a string, but they crash with the exception below. 

The code is:

ResourceManager rm = new ResourceManager("test.res",   
Console.WriteLine("got string as: "+ rm.GetString("en-GB"));

However, it crashes with:

Unhandled Exception: System.NotImplementedException: The requested
feature is not yet implemented
in <0x0002f> 00 System.Reflection.Assembly:GetSatelliteAssembly
in <0x00109> 00 System.Resources.ResourceManager:InternalGetResourceSet
in <0x000a7> 00 System.Resources.ResourceManager:GetString
in <0x0001d> 00 System.Resources.ResourceManager:GetString (string)
in <0x00087> 00 .restest:.ctor ()
in <0x00024> 00 .restest:Main ()

Is there another way to do this, or do I need to hack on the 'Assembly'
stuff before trying this kind of thing?



More information about the Mono-devel-list mailing list