what is a constructor?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data type in c# with example?

527


Is c# a backend language?

571


What is private constructor c#?

498


Is static class thread safe in c#?

470


How do you implement thread synchronization in c#?

463






List down the access modifiers available in c#?

484


Can a struct inherit from another struct or class in c#?

521


What is object array in c#?

514


What is parallel foreach in c#?

550


Explain the different types of delegates used in c#.

514


write a program to find the biggest palindrome in the given string

549


What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?

500


Why do we need generics in c#?

512


Describe the difference between inline and code behind - which is best?

557


What does dbml stand for?

554