Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
data table to dictionary
Dinesh Santhalingam
8y
250
1
Reply
I have a data table .i want to load my entire data table to my dictionary without reading each row every time.suggest me some ideas?
data table dt=new data table();
//I have some data in my table
Dictionary
<
string
, object
>
lst
=
new
Dictionary
<
string
, object
>
();
try
{
lst.Add(row["Time"].ToString(), row["Inuse"] as string);
}
catch (Exception ex)
{
throw ex;
}
return lst;
I tried this.But i want to load data table without using foreach loop .
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
How can I Decryption This HashSha256 algorithm?
list object if contain one value then return another one c#