Results 1 to 7 of 7

Thread: [RESOLVED] Collection help[VB 2003.net]

Threaded View

  1. #1

    Thread Starter
    Lively Member heeroyu16's Avatar
    Join Date
    Nov 2005
    Posts
    123

    Resolved [RESOLVED] Collection help[VB 2003.net]

    Hi guys/gals,

    Hope you guys can help me on this
    I'm trying to remove items from a collection if it has a duplicate from another collection
    Do anyone knows how to do this?
    I can use arraylist to replace it too
    I have a code here which gives me error and i'm stuck on this

    Collection A = getSno
    Collection B = getnew

    I want to check if getSno.item = getnew.items
    remove

    here's my current code
    VB Code:
    1. For b = getNew.Count - 1 To 0 Step -1
    2.                         If getSno.Item(b) = getNew.Item(b) Then
    3.                             getSno.Remove(getNew.Item(b))
    4.                         End If
    5.  
    6.                         msg = Boxno & "," & getSno.Item(b)
    7.                         olddate.Add(msg)
    8.                         pretest codes")
    9.               Next
    10.                     dg1.DataSource = olddate
    11.                     dg1.DataBind()

    Thanks for your help guys/gals
    Last edited by heeroyu16; Oct 4th, 2006 at 09:17 PM.
    ---------------------------------------------------
    noob coder
    ---------------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width