Explain constructor?
Answers were Sorted based on User's Feedback
Answer / satish
A constructor is a method that is used to create new
instances of a class. You can easily recognize a
constructor because it has the same name as the class and
is defined with syntax similar to that of a method
definition, but it has no return type.
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / ranjanatyagi
A constructor has the same name as class name.Constructor
has no return type.Constructor are used to initialize the
object.
| Is This Answer Correct ? | 7 Yes | 0 No |
Complier identifies the class name and method name sdould
be the name.which invoked when class instanciate the
object.Here possible to overload the constructor.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / salman
A constructor has the same name as class name.Constructor
has no return type.Constructor are used to initialize the
object.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / pragnyan
Constructor is a method having the same name as the class
name.It is automatically invoked when instance of the class
is created.It is used to initialize the members.Constructos
canot have any return type not even void.constructors can
be overloaded.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / surabathina
constructor is a method it gets invoked when instance of
the class is created
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the difference between static and constant variables?
What is var c#?
Define delay signing?
What is value c#?
How to find type of variable?
Hi!!! my question is how we can apply or do Themes in C#.NET? please any sample or website from where i can get the answer.
What is a .exe extension files? How is it similar to .dll extension files?
What is dll hell, and how does .net solve it?
What is asax file in c#?
When To use HashTable In C#
destructor, Dispose, Finalize - How they relate to each other
What is threading in c# with example?
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)