Question on an error message
-
I'm new to learning C# and I don't know what all the error messages mean. :sigh: Yet. Can somebody give me a clue as to what the following means. And maybe what I need to do to fix it. Thanks in advance for any information. :confused::rose: "An object reference is required for the nonstatic field, method, or property"
-
I'm new to learning C# and I don't know what all the error messages mean. :sigh: Yet. Can somebody give me a clue as to what the following means. And maybe what I need to do to fix it. Thanks in advance for any information. :confused::rose: "An object reference is required for the nonstatic field, method, or property"
This message means that u r tying to initialize any method or property of a class with out creating its object u r trying to access it directly through that class but that class is non static.It is only possible for static class to access its public methods and property directly with out creating any object.
rahul