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...

why instance? what are the uses of instance?

Answer Posted / navin c. pandit

The object of a class is called as Instance & the process is
called as Instantiation.

To access or to call a member of a class we need instance.

eg.

public class myClass
{
public myClass()
{
}

public string show()
{
return "Hello India!";
}
}

To access method show(), we need instance of the class
myClass. And the code will be as:-
myClass obj_mc = new myClass()
string str=obj_mc.show();

Now str contains string value 'Hello India!'

Hope u have got the point.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by streamreader/streamwriter class in c#?

898


Explain the Usage of web.config

957


What is a class level variable in c#?

924


What is dapper in c#?

880


Why do we use static class in c#?

854


What is a console file?

892


Why do we use abstraction in c#?

849


Is unboxing an implicit conversion?

952


Does c# have functions?

834


Which is better interface or abstract class in c#?

762


how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge

1979


How can we set class to be inherited, but prevent the method from being over-ridden?

936


if you do have a stack overflow profile.what is your ranking?

1833


How do I count the length of a string in c#?

912


Why abstraction is used in c#?

860