Solved

C# Winform errors

Posted on 2014-04-08
2
300 Views
Last Modified: 2014-04-22
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'.
0
Comment
Question by:thuhue
2 Comments
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 250 total points
ID: 39987375
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
 
LVL 29

Accepted Solution

by:
anarki_jimbel earned 250 total points
ID: 39990031
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

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question