B
Brett Wesoloski
I have a collection that I add my objects to. When I go to remove an object
from the collect I get an error {"Cannot remove the specified item because
it was not found in the specified Collection."}
Now I do understand what it is saying but I know the object is in the
collection.
Here is some code.
{KCC.MPAM.RFID.EPCCollection.EPCInfo}
_EPC: "30540232801ADB0000000006"
_ID: "Kleenex"
_Pic: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
EPC: "30540232801ADB0000000006"
ID: "Kleenex"
PIC: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
? CartEPCs[0]
{KCC.MPAM.RFID.EPCCollection.EPCInfo}
_EPC: "30540232801ADB0000000006"
_ID: "Kleenex"
_Pic: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
EPC: "30540232801ADB0000000006"
ID: "Kleenex"
PIC: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
Now they are the same.
Here is the code I am using.
CurrentEPCInfo.ID = "Kleenex";
CurrentEPCInfo.EPC = "30540232801ADB0000000006";
CurrentEPCInfo.PIC = @"C:\Visual Studio
Projects\RFID\KCC.MPAM.RFID.RocketCart\KCC.MPAM.RFID.RocketCart\Pics\KleenexTissue.jpg";
CartEPCs.Remove(CurrentEPCInfo);
Now what really confuses me is if I do this
LoadedEPCs.Add(CurrentEPCInfo);
LoadedEPCs.Remove(CurrentEPCInfo);
Add it and then remove it right away it works.
Any idea's?
TIA,
Brett
from the collect I get an error {"Cannot remove the specified item because
it was not found in the specified Collection."}
Now I do understand what it is saying but I know the object is in the
collection.
Here is some code.
? CurrentEPCInfo
{KCC.MPAM.RFID.EPCCollection.EPCInfo}
_EPC: "30540232801ADB0000000006"
_ID: "Kleenex"
_Pic: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
EPC: "30540232801ADB0000000006"
ID: "Kleenex"
PIC: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
? CartEPCs[0]
{KCC.MPAM.RFID.EPCCollection.EPCInfo}
_EPC: "30540232801ADB0000000006"
_ID: "Kleenex"
_Pic: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
EPC: "30540232801ADB0000000006"
ID: "Kleenex"
PIC: "C:\\Visual Studio
Projects\\RFID\\KCC.MPAM.RFID.RocketCart\\KCC.MPAM.RFID.RocketCart\\Pics\\KleenexTissue.jpg"
Now they are the same.
Here is the code I am using.
CurrentEPCInfo.ID = "Kleenex";
CurrentEPCInfo.EPC = "30540232801ADB0000000006";
CurrentEPCInfo.PIC = @"C:\Visual Studio
Projects\RFID\KCC.MPAM.RFID.RocketCart\KCC.MPAM.RFID.RocketCart\Pics\KleenexTissue.jpg";
CartEPCs.Remove(CurrentEPCInfo);
Now what really confuses me is if I do this
LoadedEPCs.Add(CurrentEPCInfo);
LoadedEPCs.Remove(CurrentEPCInfo);
Add it and then remove it right away it works.
Any idea's?
TIA,
Brett