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
Karthi Keyan
1k
755
238.8k
Remove Duplicate Rows From DataTable in c#
May 29 2017 5:51 AM
Hi,
I have DataTable. That have 2 Columns. one is Element, another one is Attribute. Element Column have duplicate. but Attribute not. i want to remove Entire row if is there any duplicate in Element Column. like Follow.
Element
Attribute
component/header
@[version = '1.2']
component/header/title
[cited = 'no']
@[type = 'series']
component/header/title[cited = 'no']
@[level = 'Product']
from this table i want remove 4th row. i tried to check while adding each row by DataTable.Select. but it return an error. because the Element having single quotes. Also i tried
dt.AsEnumerable().Distinct(DataRowComparer.Default);
but that's not help full. is there any idea about this.
Thanks in advance.
Reply
Answers (
6
)
How to configure Mathematics Formula in C# web application
Find slot no.'s of the connected usb's in USB Hub(10 slots)