C# Winform errors

An object reference is required for the nonstatic field, method, or  property 'Script.CustShipForm'


An object reference is required for the nonstatic field, method, or property 'Script.csm'

Please advise a fix to the above errors with 'Script'.
thuhueAsked:
Who is Participating?
 
anarki_jimbelConnect With a Mentor Commented:
Yes, it would be interesting to see code.

Usually one can see this error when calling a non static property or method  from a static method.
In this case it's necessary to either make the called property/method static, or make a calling method non-static and create an instance of a class.
0
 
käµfm³d 👽Connect With a Mentor Commented:
Please show the line that is in error.

More than likely, you are trying to call a method using the class name instead of an instance variable name.
0
All Courses

From novice to tech pro — start learning today.