I'm iterating through a list of objects of type Persons, and displaying the name and surname of each persons.
for (int i = 0; i < myList.Count; i++)
{
   Console.WriteLine("-|- Name: " + myList[i].GetName() +
                      "| Surname: " + myList[i].GetName() + "|");
}
The output in the console is as follows!
-|- Name: Abcdef | Surname: Asqw |
-|- Name: Aswer | Surname: Asdgfsdf |
-|- Name: Adxz | Surname: Asdsada |
I would like the output to be shown in the form of a table as below.
-|- Name: Abcdef | Surname: Asqw     |
-|- Name: Aswer  | Surname: Asdgfsdf |
-|- Name: Adxz   | Surname: Asdsada  |
Thanks
 
     
     
     
     
     
     
     
    