what is a constructor?
Answers were Sorted based on User's Feedback
Answer / ranjith
Constructor is a method which will be executed when an
object is created. It is used to Intialize the
object.constructors has the same name as the class
name.constructors will take parameters.constructors doesnot
return any value
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / dharmendra nonia
constructor is a special type of method that invoke when u
create a new instance of a class. Basically it is used to
initialize the member variables.Its name must be same as
the class name.It have no return type.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / divya
Constructor is a method that is executed when an object is
created.
Is This Answer Correct ? | 0 Yes | 0 No |
It is very Important to know that
---------------------------------------
Constructor is generally used to create the new instance of
a class.
Constructor is special type of method that is used to
initialized the member variable and It has same name as the
class Name.It does not have return type.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pushparaj pentakota
constructor is a special method it's invoke when object is
created and used to initialize instance members.and doesn't
have any return type.
Is This Answer Correct ? | 0 Yes | 0 No |
What is part of a method signature in c#?
Why do we need dependency injection in c#?
Define interface class in c#?
What is the difference between convert and parse in c#?
Using system; class main { public static void Main() { int a = 1; for (int i = 0; i < 10; i++) { int j = a * 5; Console.WriteLine(a + "*5=" + j); a++; } Console.ReadLine(); } }
Is overriding of a function possible in the same class?
Can you have parameters for static constructors?
In a memory when you Box and Unbox a value-type what happens?
Overloaded constructor will call default constructor internally?
What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?
What are the different ways of method can be overloaded?
what is a delegate? what it is used for?
13 Answers Choice Solutions, TCS,