Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to add objects to array without creating duplicates

Posted on 2008-10-18
3
Medium Priority
?
277 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 750 total points
ID: 22749313
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 750 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

824 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