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