static void Main(string[] args) { OtherClass oc = new OtherClass(); oc.Method1( oc.Field1 );// Base method with base field oc.Method1( oc.Field2 );// Base method with derived field oc.Method2( oc.Field1 );// Derived method with base field oc.Method2( oc.Field2 );// Derived method with derived field }
static void Main(string[] args) { OtherClass oc = new OtherClass(); oc.PrintField1(); }
static void Main(string[] args) { OtherClass oc = new OtherClass(); oc.Method1(oc.Field1); // Use the masking member. }