Solved

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

Posted on 2009-05-06
2
366 Views
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)()

      Get

        Return (_slVariables)

      End Get

      Set(ByVal svalue As SortedList(Of String, Variable()))

        _slVariables = svalue

      End Set

    End Property

Open in new window

0
Comment
Question by:louisiana_blues
  • 2
2 Comments
 
LVL 15

Accepted Solution

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


Public Property Variables() As SortedList(Of String, Variable)

      Get

        Return (_slVariables)

      End Get

      Set(ByVal svalue As SortedList(Of String, Variable)

        _slVariables = svalue

      End Set

End Property

Open in new window

0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 24321795
Do you need further assistance?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2013 Publish 13 46
Calculating a BCC (Xor) for a message 13 34
.Net Web Site Password specs 2 21
Code enhancement 5 13
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now