---
title: "What is overriding?"  
description: "What is overriding?"  
author: "Om ji mishra"  
published: 2019-10-17  
updated: 2019-10-17  
canonical: https://www.mindstick.com/forum/115427/what-is-overriding  
category: "c#"  
tags: ["c#", "programming language"]  
reading_time: 1 minute  

---

# What is overriding?

What is overriding?

## Replies

### Reply by Om ji mishra

Method Overriding is a technique that allows the use of any functions from another class (base class) in the derived class. Creating a method in the derived class with the same signature as a method in the base class is called method overriding. This is like a virtual method.

```
using System;
  class baseClass
{
 public virtual void show()
   {
        Console.WriteLine("Base class");
    }
}

class derived : baseClass
{
public override void show()
    {
        Console.WriteLine("Derived class");
      }
}

class GFG
{
public static void Main()
    {
       baseClass obj;
obj = new baseClass();
obj.show();
obj = new derived();
obj.show();
     }
}
```


---

Original Source: https://www.mindstick.com/forum/115427/what-is-overriding

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
