fork download
  1. using static System.Console;
  2.  
  3. public class Program {
  4. public static void Main() {
  5. var objects = new [] {
  6. new {Id = 2, Nome = "Wallace"},
  7. new {Id = 4, Nome = "Cigano"}
  8. };
  9. WriteLine(objects.GetType());
  10. foreach (var user in objects) {
  11. WriteLine($"Meu id é {user.Id}");
  12. WriteLine($"Meu nome é {user.Nome}");
  13. }
  14. }
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/134992/101
Success #stdin #stdout 0.02s 16000KB
stdin
Standard input is empty
stdout
<>__AnonType0`2[System.Int32,System.String][]
Meu id é 2
Meu nome é Wallace
Meu id é 4
Meu nome é Cigano