R4R
Right Place For Right Person TM
 

R4R C# C# Examples Single Inheritance in C#

C# Examples             

Index 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Example of Single Inheritance in C#



         

//Single Inheritence example in C#
class a
{
	public void display()
	{
		System.Console.WriteLine("hahahaha");
	}
}
class b : a //b is child of a
{
	public void display1()
	{
		System.Console.WriteLine("hihihih");
	}
}

class c 
{
	public static void Main()
	{
		b x=new b();//Normally object of child
		x.display();
		x.display1(); 
	}
}

 Download Source Code

Index 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R