How to

call base method in overridden method

Published: 20. October 2011 | Updated: 20. October 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Basics
Tags: Basics C#
Was this snippet helpful for you? YESYES / NONO
public class MyClass : BaseClass
{
    public override void DoSometing()
    {
        // calling base method
        base.DoSometing();

        ...
    }
}

public abstract class BaseClass
{
    public virtual void DoSometing()
    {
        ...
    }
}
Send us feedback about this snippet »



Related Snippets: