Home > DeveloperSection > Forums > inheritance in c#.net
Ankit Singh

Total Post:341

Posted on    November-02-2015 9:53 PM

 .NET C# 

 1 Reply(s)
 504  View(s)
Rate this:
how to use inheritance in c#.net. 

aditya kumar Patel

Total Post:254

Posted on    November-02-2015 10:26 PM

Inheritance 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();







Don't want to miss updates? Please click the below button!

Follow MindStick