i get this error when ever i try to compile my code here is the error
Error 1 An object reference is required for the non-static field, method, or property
below is my code
private void btnGenerate_Click(object sender, EventArgs e)
{
frmFaultyDeviceByPeriod.FirstDate = dateTimePicker1.Value;
frmFaultyDeviceByPeriod.SeconDate = dateTimePicker2.Value;
frmFaultyDeviceByPeriod.Show();
}
the form am trying to call has the below code
public System.DateTime FirstDate;
public System.DateTime SecondDate;
what am i doing wrong.. help please