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


Tolal:2 Click: 1
Username :Nik
Comments :Nice work very rasy to understand
URL :http://r4r.co.in/c1/example/C_Sharp/shtml/SingleInheritance.shtml


Username :abdullah dar
Comments :please put seach option on your website remainig that website is very good.............
URL :http://r4r.co.in/c1/example/C_Sharp/shtml/SingleInheritance.shtml

1 Show All Comments

Post Your Comments

Your Name:

Your Email ID :
Comments :
URL
  =* Enter SUM

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R