Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
inheritance with virtual orride
//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!"); a ab=new b(); ab.amethod(); } } public class a { public a() { Console.WriteLine("Hello class a"); } public virtual void amethod() { Console.WriteLine("Hello class ab method"); } } public class b:a { public b() { Console.WriteLine("Hello class b"); } public override void amethod() { Console.WriteLine("Hello class ab method from b"); } public void bmethod() { Console.WriteLine("Hello class ab method from b"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Необязательные аргументы
HashPassword
1
Speed test for email text replacements
Sum of digits in a string
C# Abstract Syntax Tree Example: Simple Pascal Compiler
Hello world
First Class
Move 2 ushort to 1 int
problem version 2
stackse - search stackoverflow differently
Please log in to post a comment.