Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Q: Why this calling base class virsion?
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine("Hello, world!"); B b=new B(); b.Show(); Console.WriteLine("Calling from Main:"+b.i);//Why this calling base class virsion how to call drived class i; } } } class A { public int i; } class B:A { new int i; public B() { i=1; } public void Show() { Console.WriteLine("i in Driverd Class:"+i); Console.WriteLine("i in base Class"+base.i); } }
run
|
edit
|
history
|
help
0
amstrong number
Fórum GroupBy ➡ Sum & Aggregate customers' names
test
Just tries to add/remove items to the list
Polygon Util
Preprocessor
масиви форіч
QLSV
Quarter Hour String Generator
Area of a field