What is the error in the following code, if any? using System;class Demo { private string name; public void print() { Console.WriteLine(nMy name is + name); } public string Name { get { return name; } set { name = value; } } class Program { static void Main(string[] args) { Demo d = new Demo(); Console.Write(Enter your name:t); d.name = Console.ReadLine(); d.print(); Console.ReadLine(); } } }
Reveal answer
Fill a bubble to check yourself