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