Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't figure out error in code

Status
Not open for further replies.

MJV57

Programmer
Apr 18, 2009
87
CA
I have a piece of code that gives me the following error:

an object reference is required for the non static field,method or property Scheduler.ProjCoorToolsDataSet.JobSchedule.get

Here is the code:
private void fakebox(object sender, EventArgs e)
{
if (ProjCoorToolsDataSet.JobSchedule[0].processStart != "")
{
fakepcstartTB.Visible = false;
}
 

I think you are using static indexer property named
'JobSchedule' to access a particular schedule and that
property is trying to access a non static field.

Check which fields that 'JobSchedule' property is using
and ensure those are static only.

Best of luck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top