Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can you explain what inheritance is and an example of when
you might use it?

Answer Posted / sandeep

In Inheritance we can use one class property into another
class..
using System;
class sample
{
public void display()
{
Console.WriteLine("C#");
}
}
class sample1:sample
//(Inheriting the property of class sample in class sample1)
{
public void disp()
{
Console.WriteLine("C++");
}
}
class Test
{
public static void Main()
{
sample1 sm=new sample1(); //creating a object of sample1
sm.display(); //accessing function of sample class
sm.disp();
}
i think dear u got ur write answer..

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain the basic use of dataview?

1066


How would you get asp.net running in apache web servers? Explain it's limitations.

981


What is app_code folder in asp net?

1060


Should I delete cookies?

968


Who creates jsessionid?

1034


What does asax stand for?

994


How asp.net mvc differs from asp.net web forms? : asp.net mvc

1100


What is query string?

1015


What is a Cookie? Where is it used in ASP.NET?

1095


If you are using components in your application, how can you handle exceptions raised in a component?

2682


Where the assembly is stored in asp.net?

1014


How do I open an ashx file?

1078


Give a few examples of page life cycle events.

1130


What is the advantage of using Windows authentication in a Web application?

1107


What is the difference between session object and application object?

1047