What is Inheritance in C# .Net ?
Inheritance:
Inheritance is the strong concept of the world of object-oriented programing.
In a Simple word, The mechanism of accessing or extending the behavior or properties of an existing class is known as Inheritance.
For an example, If a class has methods let say Add(int s, int n) and its added two given values. So if we are going to create any class and we want to create an Add function of two variable then why we create it from scratch if this is available in an existing class.
Yes, We can use the Add function of existing class in a new class as below:
public class ExistingClass
{
public int Add(int s, int n)
{
return s+n;
}
}
and the new class is:
public class NewClass : ExistingClass
{
base.Add(110,210); // this will call the existing methods
}
Nice Blog
ReplyDeleteThanks sharing for useful information
Car Rental in Amritsar
Tourist Taxi in Amritsar
Taxi Service
Amritsar Sightseeing Taxi Fare
Amritsar to Dalhousie Cab
Amritsar Airport to Golden Temple Cab Fare
Car Hire in Amritsar
Chauffeur Driven Car Amritsar
Amritsar Cab Package
Taxi in Amritsar
Car Rental Online
Taxi Rental Online
Cab Rental Online
Car on Rent in Amritsar
Taxi Rental in Amritsar
Car Rental in Amritsar
Amritsar Car Rental
Amritsar Cab Rental
Amritsar Taxi Rental
Innova Crysta Rent per Km
Innova Crysta for Rent Near Me
Innova Crysta on Rent in Amritsar
Toyota Innova Rental
Innova Crysta Taxi Price
Innova Rent per Km
Innova for Rent Near Me
Innova onRent in Amritsar
Fortuner Taxi Price
Fortuner Rent per Km
Fortuner for Rent Near Me
Fortuner on Rent in Amritsar
Fortuner Taxi Price
Etios Taxi Price
Etios Rent per Km
Etios for Rent Near Me
Etios on Rent in Amritsar
Etios Taxi Price
Swift Dzire Taxi Price
Swift Dzire Rent per Km
Swift Dzire for Rent Near Me
Swift Dzire on Rent in Amritsar
Swift Dzire Taxi Price
Hotel Booking in Amritsar
Latest Updates <a href="https://chasannews.com> Latest </a>
ReplyDeleteFor New Updated Visit New Tips
ReplyDeleteThank you for giving this useful information in this article. It's a fantastic article. I'll be waiting for your next update. I also have some useful information about the Best Custom Software Development Company in India, which I believe will be of great use to you.
ReplyDeleteFind WordPress Developers in Delhi that are available for hire for your job. Outsource your WordPress jobs to a Freelancer and save.
ReplyDelete