How to define a Property in VB.NET using the generic SortedList (Of T, V)?

Posted on 2009-05-06
Last Modified: 2012-08-13
Can an expert tell me how to use the generic SortedList as a Property?  Whenever I try the code below, I get an error.

500 points to the expert who can answer the question!
Public Property Variables() As SortedList(Of String, Variable)()
        Return (_slVariables)
      End Get
      Set(ByVal svalue As SortedList(Of String, Variable()))
        _slVariables = svalue
      End Set
    End Property

Open in new window

Question by:louisiana_blues
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 15

Accepted Solution

JackOfPH earned 500 total points
ID: 24321675
Try this code:

Public Property Variables() As SortedList(Of String, Variable)
        Return (_slVariables)
      End Get
      Set(ByVal svalue As SortedList(Of String, Variable)
        _slVariables = svalue
      End Set
End Property

Open in new window

LVL 15

Expert Comment

ID: 24321795
Do you need further assistance?

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question