Created
November 24, 2012 03:23
-
-
Save MayogaX/4138231 to your computer and use it in GitHub Desktop.
Exemple put data in list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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