Question: public class Person { private string? name; public Person(string name) i. name = name; } public void Introduce(Person p) I if (p != this &&
public class Person \{ private string? name; public Person(string name) i. name = name; \} public void Introduce(Person p) I if (p != this \&\& name!=null) Console.WriteLine("Hi, I'm" + name); 1 \} Which of the following is the reason? The logic for the if statement is wrong The data field should not be private The assignment in the constructor is ambiguous Parameterless constructor is missing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
