private void button1_Click(object sender, EventArgs e) { string name = "Chris"; myClass mc = new myClass(name); mc.name();//public mc.lastName(); //private can't access. //static don't need to create an instance of the class to access static. myClass.showMessage("Chris"); }
private void button1_Click(object sender, EventArgs e) { myClass mc = new myClass("Chris"); }
private void button1_Click(object sender, EventArgs e) { myClass mc = new myClass(); mc.ShowThoseMessages(); }
private void button1_Click(object sender, EventArgs e) { myClass mc = new myClass("Chris"); MessageBox.Show(mc.Name);//properties with get and set. }