C# Programming - Constructors - Discussion

@ : Home > C# Programming > Constructors > General Questions - Discussion

Read more:

"Time and tide wait for none."
- Alexander Pope

Which of the following statements is correct?

[A]. A constructor can be used to set default values and limit instantiation.
[B]. C# provides a copy constructor.
[C]. Destructors are used with classes as well as structures.
[D]. A class can have more than one destructor.

Answer: Option


No answer description available for this question.

Tulsi said: (Sun, Jul 3, 2011 01:39:31 AM)    
C# also provide copy construvtor so ans. Should be a & b.

Sundar said: (Sun, Jul 3, 2011 03:01:01 AM)    

Unlike some languages, C# does not provide a copy constructor. If you create a new object and want to copy the values from an existing object, you have to write the appropriate method yourself.


Hema said: (Wed, Feb 15, 2012 10:35:03 AM)    
C# provides copy constructor also.
So ans should be A &B

Srikanth said: (Fri, Feb 17, 2012 11:02:33 AM)    
C# provides copy constructor also.
So ans should be A &B

Sunil said: (Fri, Nov 2, 2012 01:53:27 AM)    
class Person
private string name;
private int age;

// Copy constructor.
public Person(Person previousPerson)
name =;
age = previousPerson.age;

// Instance constructor.
public Person(string name, int age)
{ = name;
this.age = age;

// Get accessor.
public string Details
return name + " is " + age.ToString();

class TestPerson
static void Main()
// Create a new person object.
Person person1 = new Person("George", 40);

// Create another new object, copying person1.
Person person2 = new Person(person1);

Akash said: (Sun, Sep 29, 2013 04:05:15 PM)    
Generally, constructors are of three types. But C# doesn't support copy constructor.

- Default Constructor(Non-Parametrized constructor).

- Parametrized Constructor.

- Copy Constructor.

Gaurav Balyan said: (Tue, Oct 29, 2013 11:36:35 AM)    
C# does not provide Copy Constructor and if you need one you have to do it by using a method, and you can also have a ICloneable Interface to implement the functionality.

Amaan said: (Sun, Nov 17, 2013 11:06:02 AM)    
C sharp does provide a copy construct but the prime work for the constructor is to assign values to the variables as c# you cannot use a variable without declaring assigning a value where the automatic initialization happens in the case of instance variable or global variable.

Rajeev Ranjan Kumar(Raju) said: (Sat, Mar 1, 2014 12:58:27 PM)    
C# provides three types of constructor:
1st 1 is: Default Const.
2nd 1 is: Param Const.
And 3rd 1 is: Copy Const.
So Answer Should be A & B.

Neeraj Sharma said: (Mon, Jul 14, 2014 06:07:22 AM)    
C# doesn't provide a copy constructor for objects, but you can write one yourself.

Bhavani said: (Fri, Oct 17, 2014 01:15:05 PM)    
C# doesn't provide copy constructor, every class have implicit constructor.

Arul said: (Fri, Mar 20, 2015 04:42:24 PM)    
C# provide a copy constructor and C# class have more than one constructor. So answer B & D.

Hema said: (Tue, Apr 14, 2015 11:09:50 PM)    
C# provides copy constructor also.

So, A and B both are correct.

David said: (Mon, Oct 5, 2015 12:01:34 PM)    
Constructors is automatically invoked when the class objects is initiated.

Write your comments here:
Name *:     Email:

© 2008-2016 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us:     Follow us on twitter!