Click here to Skip to main content
15,902,020 members
Articles / Programming Languages / C# 3.5

LINQ: Get all the values from a column in a DataTable in C#

Rate me:
Please Sign up or sign in to vote.
1.00/5 (1 vote)
18 Oct 2011CPOL 22.5K   2  
Which will crash if the datatype of the column is not a string.You might also want to note that this only works for typed datasets.This version works for all datasets, can handle any datatype, and handles null values: table.Rows.AsQueryable() // make...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Netherlands Netherlands
Doing that 'computer thing' ever since the C64.

Sometimes I feel that being a programmer is much like being a doctor: You just have to know everything and if you don't, something dies.

Either being an application or a patient.

Oddly enough, more people care about the death of their application, than the massacre of people...

Comments and Discussions