1
Answer

Store Values to List Directly

Hi,
 
Is it possible to store the values to list directly.
 
For EX: i query the database by select query, normally we store the  values to datatable or dataset. i dont want to store the values directly to neither dataset nor datatable.
 
i need to store directly to LIST. is it possible?
Answers (1)
0
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
Yes, definitely!
In fact you should NEVER store it in data table or data set at all. It is a wrong way, somehow very popular among the developers. I never understood why.
Google sample code for "SqlDataReader" and you will know.
Any question(s), please do let me know and I will explain. But code is already there all over the Internet.