Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

how would i go about setting a collection equal to another collection. for example, i pass a parameter into a sub, then use a select case to set a general collection equal to a specific collection. make sense? probably not. heres what ive got so far.

 

Private Sub NameCollection(ByVal Which As Short)
   'gives the generic object 'collectionOb' a specific value depending on the selected tab
   Select Case Which
       Case 1
           collectionOb = keyCol
       Case 2
           collectionOb = accCol
       Case 3
           collectionOb = denyCol
   End Select
End Sub



 

(collectionOb is public)

Posted

i define collectionOb up at the top.

Public Class SettingsForm
   Inherits System.Windows.Forms.Form
   Dim collectionOb As Object
   Dim errStr, fileString As String

What collection are you using with this routine?

 

What do you mean?

  • Administrators
Posted

Just reread your post and I think I jet what you mean now.

 

in the snippet

 

Case 1
           collectionOb = keyCol
       Case 2
           collectionOb = accCol
       Case 3
           collectionOb = denyCol

 

where are keyCol, accCol and denyCol defined? Also is there a reason you are defining collectionOb as an object rather than a collection?

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...