Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Inheritance Fallback
//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(new Goku().Say()); Console.WriteLine(new Gohan().Say()); } } public abstract class Base { public abstract string Say(); public abstract string GetName(); } public class Goku: Base { public override string Say() { return String.Format("My name is {0}", GetName()); } public override string GetName() { return "Goku"; } } public class Gohan: Goku { public override string GetName() { return "Gohan"; } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
C:\Documents and Settings\Админ\Рабочий стол\ШЭ информатика
Lambda Expression
Server last restarted
InvokeProgram
Recursive 3
abdurrahimcan@gmail.com
Trading
ss
HelloWorld
c
Please log in to post a comment.