Esempio n. 1
0
 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");
 }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     myClass mc = new myClass("Chris");
 }
Esempio n. 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     myClass mc = new myClass();
     mc.ShowThoseMessages();
 }
Esempio n. 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     myClass mc = new myClass("Chris");
     MessageBox.Show(mc.Name);//properties with get and set.
 }