Results 1 to 2 of 2

Thread: How to write a this method in vb.net

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    How to write a this method in vb.net

    I have a c# statement:

    public Vehicle this[int indexer]
    {
    Get
    {
    do stuff
    }
    }




    How can I write this in vb.net? exactly what does that C# statement do? does it override the standard property "this" reference?


    kind regards
    Henrik

  2. #2
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112
    i guess
    VB Code:
    1. Public ReadOnly Property Vehicle(ByVal indexer As Integer)
    2.       Get
    3.          'do stuff
    4.       End Get
    5.    End Property
    i'm quiet not sure. it's something like an indexer property. used as
    Code:
    Something=Vehicle(2)
    receives the third index...

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