When compiler adds a default constructor to a class?

Answers were Sorted based on User's Feedback



When compiler adds a default constructor to a class?..

Answer / chandana

The compiler adds a default constructor to a class when no
constructor are specified by the programmer.

Is This Answer Correct ?    10 Yes 0 No

When compiler adds a default constructor to a class?..

Answer / sitaram

when ever compile the class,First compiler check the any
type of constructor is available or not in that class? if
it is not available. compiler will automatically create the
default constructor.

Is This Answer Correct ?    3 Yes 1 No

When compiler adds a default constructor to a class?..

Answer / abhay k pandey

When there in no explicite parameterless constructor
written for any class. C# compiler calls the default
constructor and initializes fields with zero, false and
null values.

Is This Answer Correct ?    1 Yes 0 No

When compiler adds a default constructor to a class?..

Answer / romeo

when the object of that class is created with no parameters
passed.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Sharp Interview Questions

Why do we use threads in c#?

0 Answers  


Write an expression which satisfies the following statements: (i) Creates an object of type q (ii) If m is null, returns n, otherwise returns m (iii) If x and y are string types, it concatenates x and y

1 Answers  


If I return out of a try/finally in c#, does the code in the finally-clause run?

0 Answers  


What is access specifier in c#?

0 Answers  


How can we main a Class as base class,i.e not inherited further?{please Dont tell using Sealed class,any other way}

6 Answers   ACB Group, IBM, Tech Mahindra,


How can we sort an array in c#?

0 Answers  


Why do we need events in c#?

0 Answers  


Can a class be private in c#?

0 Answers  


What is the system namespace?

0 Answers  


Explain ACID rule of thumb for transactions.

1 Answers  


How do you restrict the type which can be used in custom generic?

1 Answers   IBM,


What is windows application in c#?

0 Answers  


Categories