Imorting icon from Resource file

Oct 15 2010 1:46 PM
Greetings:

I have having a bit of trouble with the following code snippet:
ResourceManager rm = new ResourceManager("Bastion.Database.svrBrowse",GetType().Assembly)
DataGridViewImageColumn imgCol = new DataGridViewImageColumn(); 
Icon colIcon = (Icon)rm.GetObject("check-green.ico");  // Line Throws a Object reference not set to an instance of an object. Error

rm.ReleaseAllResources();
 
How do I make the proper assignment here?  I am in the process of learning C#.  Thanks.

Answers (2)