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
Tom
NA
31
0
Comparing a string to a datatable
Sep 16 2008 8:57 AM
Hi there,
I am very new to C# (as my explanation will show)
I currently have a program that reads lines in from a text file, and processes them in a windows form.
The items being read are products, i want to calculate the occurrences of the read in products
Say for instance,
Apple
Apple
Orange
Banana
I want to be able to take "Apple" and then search through my frequency table, to see if it exists. If it doesn't, add it, and change the occurrence to "1". If it does, just change the occurrence on that record, then next item.
At the moment i am trying to construct a crazy while loop, but i think that there must be a easier way to simply compare my string to the datatables fields.
Thanks in advance for any help given :)
Tom
Reply
Answers (
2
)
Convert Byte[] to string
RegOpenKeyEx(HKey, sKey, 0, KEY_READ, k)