Hi
This gives an error at line myObj[0].Name = "Macron";
Thanks.
See my code:
using System; class Friends { public string Name; static void Main(string[] args) { Friends[] myObj = new Friends[3]; myObj[0].Name = "Macron"; myObj[1].Name = "Rutte"; myObj[2].Name = "Johnson"; Console.WriteLine(myObj[0].Name); Console.WriteLine(myObj[1].Name); Console.WriteLine(myObj[2].Name); } }