---
title: "inheritance in c#.net"  
description: "inheritance in c#.net"  
author: "Anonymous User"  
published: 2015-11-02  
updated: 2015-11-02  
canonical: https://www.mindstick.com/forum/33561/inheritance-in-c-sharp-dot-net  
category: ".net"  
tags: ["c#"]  
reading_time: 1 minute  

---

# inheritance in c#.net

how to use [inheritance in c#](https://www.mindstick.com/forum/158920/explain-the-concept-of-inheritance-in-c-sharp-and-provide-an-example).net.

## Replies

### Reply by Anonymous User

[Inheritance](https://www.mindstick.com/articles/13095/inheritance-and-its-types) means parent-child relationship.By using Inheritance methodology we can create a new class by using existing class code ( reuse existing methods, properties ).It also referred to as reusability of the code so by using Inheritance we can reuse the code again and again.

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
namespace Forum
{

    public class ParentClass
    {
        public void ParentCall()
        {            Console.WriteLine("Called Parent Class.");        }    }    public class ChildClass : ParentClass
    {        public void ChildCall()
        {
            Console.WriteLine("Called Child Class.");
        }        static void Main(string[] args)
        {            ChildClass child = new ChildClass();
            child.ParentCall();            child.ChildCall();            Console.ReadLine();        }    }
}
```

```

```


---

Original Source: https://www.mindstick.com/forum/33561/inheritance-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
