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 is data binding c#?
Do while loops yes or no c#?
What are the new features in c# 2.0?
What are the uses of namespaces?
what is the difference between int and Int32?
What is asynccallback c#?
What is a interface in c#?
What benefit do you get from using a primary interop assembly (pia)?
What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?
What's difference between constants and static readonly?
what is method overloading in c#?
Why dataset is used in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)