TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nikunj Satasiya
183
10k
3.6m
Get distinct records from datatable
Apr 10 2019 2:29 AM
Hello Everyone,
I have a data table with the following columns and rows as I showed below.
DataTable dt =
new
DataTable();
try
{
dt.Columns.Add(
"f1"
);
dt.Columns.Add(
"f2"
);
dt.Columns.Add(
"f3"
);
dt.Rows.Add(
"ABC"
,
"ATAG"
,
""
);
dt.Rows.Add(
"abc"
,
"atag"
,
""
);
dt.Rows.Add(
"abc"
,
"ATAGChild"
,
""
);
}
catch
(Exception)
{
throw
;
}
I want to get distinct records from this data table (check case sensitive information) and I need the following expected output as a result in the data table.
Expected Output:
f1
f2
ABC
ATAG
abc
ATAGChild
where f1 and f2 is my column.
Reply
Answers (
5
)
To execute using do while loop
How to save images to a folder with its original name?