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 generation of Garbage Collection in C# .NET ?
What is the difference between final finally and finalize in c#?
Can a class or a struct have multiple constructors?
What does virtual keyword mean ?
Why do we use abstract class in c#?
in a town the percentage of total men is 52. the percentage of total literacy is 48. if total percentage of literate men is 35 of total population. write a program to find out the total no of illiterate men and women.
What is sqldatareader c#?
Is c sharp free?
What is visual c# net?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
What is anonymous types in c#?
How does dependency injection work c#?