Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Simple Overriding
//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 { class A { public virtual int foo() { return 3; } } class B : A { public override int foo() { return 2; } } public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine(new B().foo()); } } }
run
|
edit
|
history
|
help
0
Create Sealed Class Object
izem
Testing 003
generic hierarchy1
aszasxsdf
MC
equation with a variable on the 2nd power
2.10.4
project euler 11, C#
HMS abstract