Warning?! It should give you a compilation error!
As Wayne already said,
ComponentResourceManager
is a class and starts with a capital C.
Patoh58 wrote:
An object reference is required for the non-static field, method, or property 'System.Resources.ResourceManager.GetObject(string)' if ts a small c then the one above is a warning
GetObject is an instance method of
ComponentResourceManager
. You need an instance of the class to access this method, which you seem to have not created.
Add this line:
ComponentResourceManager componentResourceManager = new componentResourceManager();
now this line makes sense,
componentResourceManager.GetObject("tsbAddCategory.Image");
For more information about the class, check the MSDN link -
ComponentResourceManager Class[
^]
Hope this helps! :thumbsup: