alrabaca
July 17th, 2007, 06:01 PM
Hi there,
I'm trying to create a check if a string value already is contained inside a ListBox which has over 45000 values in it. The problem I have is the function:
listBox1->Items->Contains(....);
only accepts objects inside the contains parameters, but I want to check a std::string value with it.
Before you suggest using ToString:
listBox1->Items->ToString()->Contains(myString);
It doesnt work because that makes the parameter a System::String not std::string. I'm most likely talking rubish but please do correct me and give me ideas on how to go about this.
Thanks in advance
I'm trying to create a check if a string value already is contained inside a ListBox which has over 45000 values in it. The problem I have is the function:
listBox1->Items->Contains(....);
only accepts objects inside the contains parameters, but I want to check a std::string value with it.
Before you suggest using ToString:
listBox1->Items->ToString()->Contains(myString);
It doesnt work because that makes the parameter a System::String not std::string. I'm most likely talking rubish but please do correct me and give me ideas on how to go about this.
Thanks in advance