Explain constructor.

Answer Posted / kousik

Main Advantage of Cons:
1)Object Initialization
2)Class don't have Private access specifier through use of private constructor avoid inheritance.
3)Types:a)static b)Instance
a)--Default automatically crates and no arguments are not supplied.
b)-Same name of class but we have n no of arguments.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the implicit name of the parameter that gets passed into the set method/property of a class?

770


How can encapsulation be achieved?

808


What's the difference between abstraction and encapsulation?

656


Is it good to use var in c#?

617


What is stringwriter c#?

605


Is multiple inheritance possible in c#?

755


What is check/uncheck?

804


What is difference between events and delegates?

675


How do you name a variable in c#?

691


What do you understand by an Implicit Variable?

719


Enlist the different types of classes in c#?

697


Give examples for reference types?

720


Why main is static in c#?

760


Why do we need singleton class in c#?

711


How to do and Apply Themes to Datagrid,Lable,Textbox,etc., in C#.NET 2005 Windows Application? (like who we will do themes in ASP.NET using .CSS and .SKIN files). Urgent!!

1864