What is Object in C# ?
An object is a real-time entity by which a class comes into existence.
Without creating the object we can not use the class.
For Example:
public class MyClass
{
int x=10;
public void MyFunction()
{
Console.WriteLine(x.ToString());
}
}
If we want to use the MyClass's MyFunction in another class then we have to create an object of MyClass in another class like below:
public class MyOtherClass
{
// Here we want to use the MyFunction of MyClass the create an object of this.
MyClass obj=new MyClass(); // By this line of code object will be created and stored as "obj".
//Now by the help of this "obj" we can call the MyFunction(); as below.
obj.MyFucntion();
}
Output: 10.
What is Inheritance in C# .Net ?
Without creating the object we can not use the class.
For Example:
public class MyClass
{
int x=10;
public void MyFunction()
{
Console.WriteLine(x.ToString());
}
}
If we want to use the MyClass's MyFunction in another class then we have to create an object of MyClass in another class like below:
public class MyOtherClass
{
// Here we want to use the MyFunction of MyClass the create an object of this.
MyClass obj=new MyClass(); // By this line of code object will be created and stored as "obj".
//Now by the help of this "obj" we can call the MyFunction(); as below.
obj.MyFucntion();
}
Output: 10.
What is Inheritance in C# .Net ?
Thanks for sharing to this post. It is a helpful post for developers who is working in a software development company.
ReplyDeleteNice 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
Very interesting post...
ReplyDeleteAbout - What is Object in C# ?
hire c# developers
hire c sharp developers
UK USA Australia Canada Latest Scholarships
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.
ReplyDeleteHire a developer with excellent coding standards including the author’s name, the date, the file was created, the date it was modified, how many times it had been changed, and the reason for the code.
ReplyDeleteHire a Developer