title: Output elements from a struct array
body: <p>I'm tasked to ask the user for their data (name, last name, email &amp; password), but I'm constrained to only using 25 lines per method which means that I have to use MANY of them. I'm using a struct for the data, and vectors for each user. However, when I want to display the users information it shows completely blank or just the direction of the array. I've tried many things with little to no success.</p>
  <p>Here's the code in question.</p>
  <pre><code>    using System;
  
  public struct Usuario
      {
          public String name;
          public String lastname;
          public String email;
          public String phone;
          public String password;
      }
  static void Main() 
      {
          Console.Clear();
          Usuario[] user = new Usuario[5];
         Array.Copy(user, UserNew(), 5);
         UserView(user);
  
      }
  static Usuario[] UserNew()
      {
          int control = 1, i = 0;
          Console.Clear();
          Usuario[] register = new Usuario[5];   //It's supposed to have 5 users
          Console.Write(&quot;\t\t¡Bienvenido al registro de usuario!\n\n&quot;);
          while(control == 1)
          {
              register[i].name = Name();
              register[i].lastname = LastName();
              register[i].email = Email();
              register[i].phone = Phone();
              register[i].password = Psswrd();
              Console.Write(&quot;\n\n\t¿Desea registrar otro usario?\n\tDigite 1 para registrar otro: &quot;);
              control = int.Parse(Console.ReadLine());
              i++;
          }
          Menu();
          return register;
      }
  static void UserView(Usuario[] UserReg)
      {
          UserReg = new Usuario();
          Console.Write(&quot;\n\tIntroduzca el código de acceso: &quot;);
          String access = Asterisk('*');
          if (access == &quot;123456&quot;)
          {
              for (int i = 0; i &lt;= 2; i++)
              {
                  Console.Write(&quot;\n&quot; + UserReg[i]);
              }
          }
          else
          {
              Console.Write(&quot;\n\n\tEl código de acceso es incorrecto!&quot;);
              Thread.Sleep(2000);
              Menu();
          }
      }
  </code></pre>