Solved

Need to add objects to array without creating duplicates

Posted on 2008-10-18
3
256 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now