mardi 24 mars 2015

How can I create a global checkbox array in c#?

I'd like to create a global checkbox array that's accessible from anywhere.



static class global
{
public static CheckBox[] checks = { checkBox1, checkBox2, checkBox3, checkBox4, checkBox6, checkBox7 };

}


This code underlines the checkboxes and sais:



An object reference is required for the non-static field, or property 'WindowsFormsApplication4.Form1.checkbox1'






Aucun commentaire:

Enregistrer un commentaire