Results 1 to 3 of 3

Thread: VB.NET equivelent of 'type'

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    53

    VB.NET equivelent of 'type'

    I've been searching for ages and can't find the VB.NET version of 'type':

    Code:
    private Type MyVars
    hours as byte
    minutes as byte
    End Type
    How would I do that in VB.NET?

    TIA

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Use a structure.

    Structure Point
    Public x, y As Integer
    Public Sub New(x As Integer, y As Integer)
    Me.x = x
    Me.y = y
    End Sub
    End Structure

    Look up structures in the msdn library for more information about them. They are almost like objects, but not...lol.
    http://msdn.microsoft.com/library/de...AndClasses.asp

    Here is what you asked converted:

    Private Structure MyVars
    Public hours As Byte
    Public minutes As Byte
    End Structure

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    53
    Thanks

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