public static void Main() { Asset objAsset = new Asset(); objAsset.AssetId = 10; AssetVer2 obj2 = new AssetVer2(); obj2.AssetId = "10"; Console.WriteLine("obj2 AssetId: {0}", obj2.AssetId); }
public static void Main() { /*Class1 obj1=new Class1(); * Class2 obj2=new Class2(); * * obj1.i=123; * obj2.i(); * * In Shadowing Parent class method is completely replaced by the child element.*/ Asset objAsset = new Asset(); objAsset.AssetId = 10; AssetVer2 obj2 = new AssetVer2(); obj2.AssetId = "10"; Console.WriteLine("obj2 AssetId: {0}", obj2.AssetId); }