Awnser the following questions in C# programming language: If we declare any con
ID: 2085711 • Letter: A
Question
Awnser the following questions in C# programming language:
If we declare any constructor for the class, the compiler will not make the default implicit constructor for us. True False The use of automatic properties is not recommended because your control over the assigned values is limited. True False The main purpose of the enumerations is to replace the numeric values. Given the following code, what is the output? enum Days {Mon, Tue, Wed, Thu, Fri, Sat, Sun} ... Console. WriteLine((int)Days.Mon): nothing, it is a compiler error Mon 1 0Explanation / Answer
Question 1
If we declare any constructor for the class, the compiler will not make the default implicit constructor for us.
In such a case the user may still force the automatic generation of a default constructor by the compiler that would be implicitly-declared otherwise with the keyword default.
Question 2
The use of automatic properties is not recommended because the control over the assigned value is limited.
This is also true because it will be difficult to check for invalid data
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.