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?

Answers were Sorted based on User's Feedback



why instance? what are the uses of instance?..

Answer / 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

why instance? what are the uses of instance?..

Answer / gg

create memory for that object in heap

Is This Answer Correct ?    1 Yes 0 No

why instance? what are the uses of instance?..

Answer / yathirajulu

instace is the way to access members(methods) in that
class,by this instance to invoke the methods.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Sharp Interview Questions

Which is faster abstract class or interface in c#?

0 Answers  


How?s method overriding different from overloading?

3 Answers  


Write the sample code for threading in c# .net..

4 Answers   Logica CMG,


How do you prevent a method from being overridden in c#?

0 Answers  


What is assembly and dll in c#?

0 Answers  


Is Multiple-inheritance supported by c#?

0 Answers   Siebel,


How many bytes is an int?

0 Answers  


What does console readline do in c#?

0 Answers  


How to create events for a control? What is custom events? How to create it?

0 Answers  


How do I create a multilanguage?

0 Answers  


2. What happened when BO object has been called?

0 Answers   Mphasis,


Why do we use ienumerable in c#?

0 Answers  


Categories