Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

57 lines
508 B
C#

//
// base and properties test
//
using System;
class X {
int val;
public virtual int prop {
get {
return val;
}
set {
val = value;
}
}
public int AAA {
set { }
}
}
class Y : X {
int val2 = 1;
public override int prop {
get {
return val2;
}
set {
val2 = value;
}
}
int A () {
if (base.prop != 0)
return 3;
base.prop = 10;
if (base.prop != 10)
return 2;
return 0;
}
public static int Main ()
{
Y y = new Y ();
return y.A ();
}
}