Results 1 to 2 of 2

Thread: [RESOLVED] Convert C# to VB

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    Resolved [RESOLVED] Convert C# to VB

    Can someone help me convert these statements to VB
    Code:
    if (_control is BaseDataList)
    if (_control is ListControl)
    I have tried:
    VB Code:
    1. If _control Is BaseDataList Then
    2. End If
    3.  
    4. If _control Is ListControl Then
    5. End If
    And
    VB Code:
    1. If _control = BaseDataControl Then
    2. End If
    3. If _control = ListControl Then
    4. End If
    Either way I get
    'BaseDataList' is a type and cannot be used as an expression.
    'ListControl' is a type and cannot be used as an expression.


    .
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  2. #2

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    Re: Convert C# to VB

    I figured it out, it is
    VB Code:
    1. If TypeOf _myControl Is BaseDataList Then
    2. End If
    3. If TypeOf _myControl Is ListControl Then
    4. End If



    .
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

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