Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            mySecondClass mc = new mySecondClass();

            myThirdClass mtc = new myThirdClass();

            mtc.Test = "10";// inherites from all classed as dirived.
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            mySecondClass mc = new mySecondClass();

            MessageBox.Show(mc.age.ToString());     //member of myclass.
            MessageBox.Show(mc.hairColor);          // member of second class.
            MessageBox.Show(mc.Name);               //protected can't access.
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            //myClass mc = new myClass();//abstract blocks creation.
            //mc. prevent users from createing instance.

            MyClass.Age = 10;

            mySecondClass test = new mySecondClass();

            test.showMessage("Hello World!");
        }