Skip to content

Instantly share code, notes, and snippets.

@MayogaX
Created November 24, 2012 03:23
Show Gist options
  • Select an option

  • Save MayogaX/4138231 to your computer and use it in GitHub Desktop.

Select an option

Save MayogaX/4138231 to your computer and use it in GitHub Desktop.
Exemple put data in list
List<MyClass> list = new List<MyClass>();
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
MyClass class = new MyClass();
class.name = reader["name"].ToString();
class.number = Convert.Toint32(reader["number"]);
list.Add(class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment