DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Posts
    27

    Compare and removing elements

    H1, Using VB Net (2005, Access (2003) in Windows Forms, I would like to know
    What would be the best way to remove same elements found in a line of text, let me
    Explain further my example: for this purpose I will name (line of text-1) and (line of text-2) for my 2 entity, (line of text-1) is being pull from a dataset.Tables(“tblSomeTable”).Rows(x).Item(13) that field may contains no more than 6 elements separated by coma, those elements are and will always be the same. Now for (line of text-2) I am thinking of something like this :
    Dim List As String = {“Hardware”, “Labour”, “Part”, “Service”, “Software”, “Warranty”} Now that we have both entities, I would like to compare them and then remove elements in (line of text-2) that are found the same in (line of text-1) so I be able to add the remaining elements to a listBox. Hope to have been clear enough and hope that someone can help me. Thank you in advance.

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,649
    Is your primary concern not to add duplicates to the listbox?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Sep 2008
    Posts
    27

    Follow up

    Hi, Mister Hack my concern is first is to compare both strings and see if string(Line of text-2) has some items found the first string(Line of text-1) if so then remove
    those items from the string(Line of text-2) and then
    populate a listBox with the remaining items of the string(Line of text-2). Thank you in advance

  4. #4
    Join Date
    Sep 2008
    Posts
    27
    Hi , Is Mister Hack out on vacation, he ask a question, I answer now seem my tread is dead.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links