Qtr No. 213, New Town Yehlanka
Indore 454775, India
Oran and Ron have written a code for constructor. Which among the following options is CORRECT as per the below code?
class Student
{
public Student(int studentId,string studentName)
{
//Statements
}
public static void Main(string[] args)
{
Student s = new Student(103, "Oran");
}
}Oran: It is not mandatory to have default constructor in the code.
Ron: Control first executes the default constructor provided by compiler, since there is no default provided.
To get all Infosys Certified CSharp Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee