namespace One public abstract class Base public int public Base int in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
namespace One
{
public abstract class Base
{
public int i, a, b;
public Base(int i, int a, int b)
{
this.i = i;
this.a = a;
this.b = b;
}
public virtual int ArithmeticMethod()
{
return a * b;
}
public void SetObjectNum()
{
this.i = i*1;
}
public abstract void ClassInfoMethod();
}
}
namespace Two
{
public class ElseOne : One.Base
{
public ElseOne(): base(i, a, b)
{
this.a = a;
this.b = b;
this.i = i;
}
public override int ArithmeticMethod()
{
return a + b;
}
public void SetObjectNum(int number)
{
this.i = i;
}
public override void ClassInfoMethod()
{
Console.WriteLine("ElseOne " + i);
}
}
}