why instance? what are the uses of instance?
Answers were Sorted based on User's Feedback
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 |
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 |
What are the Types of compatabilities and explain them
How?s method overriding different from overloading?
What is early binding and late binding
12 Answers ABC, Infosys, TATA,
What?s the role of the DataReader class in ADO.NET connections?
What is use of FormBoarderStyle Propertie
How to make a class not inheritable other than sealed?
what are wrapper classes?
What is the benefit of dependency injection c#?
How many bytes is an int in c#?
What is an int c#?
What is the purpose of abstract class in c#?
What is data type c#?