Results 1 to 6 of 6

Thread: [RESOLVED, can't be done] Select Case with reference types

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662

    Resolved [RESOLVED, can't be done] Select Case with reference types

    I was under the impression that it would be possible to do a select case on reference types themselves (not just their properties.) The comparator for reference types is 'is', not '=', but Case Is GetType(Splitter) automatically inserts the '='. It doesn't like Case Is Is GetType(Splitter) either.

    Any ideas on how to do this, preferably with select case, as I will be adding more than just two types later on.

    vb Code:
    1. For Each current As Control In form.Controls
    2.     Select Case current.GetType
    3.         Case Is = GetType(Splitter)
    4.             'some code
    5.         Case Is = GetType(ColumnHeader)
    6.             'more code
    7.         Case Else
    8.             'nothing
    9.     End Select
    10. Next
    Last edited by agent; Sep 6th, 2007 at 09:28 PM.

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