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
Ray Sotkiewicz
NA
14
2.2k
How to use Array.IndexOf() to search a column in a datatable
Jan 2 2011 2:24 AM
I want to search a column in a datatable for a specific value.
In a separate loop I have:
if
(ContainsViaIndex(dataconfig.data.Tables[0].Columns[1], Device0Loop))
{
MessageBox
.Show(
"HOLY CRAP!!"
);
}
And then...
public
static
bool
ContainsViaIndex(
DataObject
data,
int
value)
{
return
Array
.IndexOf(data, value) > -1 ?
true
:
false
;
}
My problem (Total noob at this), is how to define what "DataObject data" is...
I am getting the following error in my compiler:
Error 2 Argument '1': cannot convert from 'System.Data.DataColumn' to 'System.Windows.Forms.DataObject' D:\Joystick to FSUIPC converter\TestConsoleForm.cs 672 41 UIPC_SDK_CSHARP
So.. what kind of 'type" should I use?
Reply
Answers (
1
)
While passing data parameter from application getting exception.
memory management and variables