View difference between Paste ID: TKXAE6xP and cFPHTkB2
SHOW: | | - or go back to the newest paste.
1
using System;
2
3
namespace Prov
4
{
5
    public class A
6
    {
7
        public int a=2, b=3;
8
        public int c
9
        {
10
            get
11
            {
12
                do
13
                {
14
                    a = a + a;
15
                    --b;
16
                }
17
                while
18
                    (a < 30);
19
                return
20
                    (a - b);
21
            }
22
            set
23
            {
24
                c = value;
25
            }
26
        }
27
    }
28
    class programm
29
    {
30
        public static void Main()
31
        {
32
            A myB = new A();
33
            Console.WriteLine(myB.c);
34
            Console.ReadLine();
35
        }
36
    }
37
    public class B : A
38
    {
39
        public B() : base() { }
40
    }
41
}