Results 1 to 5 of 5

Thread: Indexer ?[Resolved]

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Indexer ?[Resolved]

    When working on ADO.NET , I faced indexers that exist only in C# , What are these indexers ?
    Last edited by Pirate; Apr 28th, 2003 at 03:13 AM.

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    An indexed property represents a collection of values, allowing the client code to use array like syntax to access a specific value in the collection.

  3. #3

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Hmm , how would you convert this to C# then .It says there is no Item property .

    Code:
    TreView.Nodes.Add(dv.Item(0).Row.Item(i).ToString)
    Thanks

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Whenever you come across an item property in VB.NET, most likely the C# equivalent is an indexer.

    So if you see this
    VB Code:
    1. TreView.Nodes.Add(dv.Item(0).Row.Item(i).ToString)
    The C# equivalent would be
    Code:
    TreView.Nodes.Add(dv[0].Row[i].ToString());
    Dont gain the world and lose your soul

  5. #5

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    It looks like fixed rule DevGrp . Thanks dude !

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