Skip to content

Instantly share code, notes, and snippets.

@MayogaX
Created September 21, 2015 20:48
Show Gist options
  • Save MayogaX/2d30a838bab25e62650f to your computer and use it in GitHub Desktop.
Save MayogaX/2d30a838bab25e62650f to your computer and use it in GitHub Desktop.
List lista = new List();
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
MinhaClasse classe = new MinhaClasse();
classe.propriedade = reader["propriedade"].ToString();
classe.total = Convert.Toint32(reader["total"]);
lista.Add(classe);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment