Solved

Need to add objects to array without creating duplicates

Posted on 2008-10-18
3
258 Views
Last Modified: 2013-12-17
I am building a RFID inventory project.  I need to track RFID tags passing several antenna's.  RFID tags will be read several times approx 40+ times as they pass an antenna.  I need to be able to build an object with various information from the RFID read without it duplicating tag information so that I can add it to a database without causing duplicate entries and/or un needed database access.  In the perl world I would just assign a tag to say $rfid{$tagid} = "something" which would keep duplicates from being an issue using a HASH.  Is there something similar that can be done in C# or even a better way?

A bit of code would be most desirable but at least a link to some useful information would be greatly appreciated.
0
Comment
Question by:Tekati68
3 Comments
 
LVL 16

Accepted Solution

by:
CuteBug earned 250 total points
ID: 22749313
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 250 total points
ID: 22771077
You can use an List <T> for that
In a list you can use the contains to see whether the value exists or not by .Contains()

MSDN
http://msdn.microsoft.com/en-us/library/6sh2ey19(VS.80).aspx
0
 

Expert Comment

by:trenstar
ID: 22840585
Hi Tekati68

I am interested in how you read RFID tags?
Are you able to lock the tags in order to stop other readers / users from reading your tags and modifying the data on the tag?

Currently using Sirit reader with the GEN 2 tags, but when I lock the fields on the tags (kill, access, tid, tag_id, user_data), I am still able to read the tag without the new access password.
All this in C# and using the RAPID sdk.

Hop you can help!

Thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question