C Sharp (C#) - Classes and Objects
Which of the following is the correct syntax to create a new object of class
Person?Person?new keyword and parenthesesnew ClassName() with parentheses.new Person(); correctly. Person p = Person.new(); uses wrong syntax with dot notation. Person p = new Person; misses parentheses. Person p = Person(); misses new.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions