'How to call tostring method on all objects
I have a school project where I have to make every tostring method appear on every object. Does anyone know how to do it?
Solution 1:[1]
foreach(Escola escola in IPP.Escolas)
{
Console.WriteLine(escola .ToString());
}
You can use the foreach loop to print every element on the array.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alon Vaisgur |
