title: Show list<T> in listview
body: <p>I have a list:</p>
  
  <pre><code>public class Person
  {
      public decimal n1 { get; set; }
      public decimal n2 { get; set; }
  }
  
  List&lt;Person&gt; dbItems = new List&lt;Person&gt;();
  
  public void getinfo(int id)
  {
      using (var con = new SqlConnection(connectionString))
      {
          con.Open();
          string query = "select * from Zboruri where cod_decol_ateriz = " + id;
          var resQuery = new List&lt;Person&gt;();
          using (var com = new SqlCommand(query, con))
          {
              var reader = com.ExecuteReader();
              int a = reader.GetOrdinal("number1");
              int b = reader.GetOrdinal("number2");
              while (reader.Read())
              {
                  resQuery.Add(new Person { 
                      n1 = reader.GetDecimal(a),
                      n2 = reader.GetDecimal(b)
                  });
              }
          }
      }
  </code></pre>
  
  <p>I wish to display this list in a listview, but I don't know how. I know I have to use <code>foreach</code>, but how? Please give me an example how!</p>