Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double Link List
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Miscellaneous
Thread ID:
01545828
Message ID:
01545871
Views:
42
Hello Kevin,

Thank you very much for your reply. Would it be possible to this without creating seperate classes for each node in the Link List?

Thank You

Gary

>Gary,
>
>The problem is in this method:
>
>> Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
>>
>> Dim oClass As New clsString
>> Dim oClass02 As New clsString
>> Dim oClass03 As New clsString
>>
>> oClass.strString = "1"
>>
>> Dim oLinkListNode As New LinkedListNode(Of clsString)(oClass)
>> Dim oLinkList As New LinkedList(Of clsString)
>>
>> oClass.strString = "2"
>> oLinkList.AddLast(oClass)
>>
>> oClass.strString = "3"
>> oLinkList.AddLast(oClass)
>>
>> oLinkList.AddFirst(oLinkListNode)
>>
>> DisplayLinkList(oLinkListNode)
>>
>> End Sub
>
>You are instantiating three different instances of clsString, but you are only using one of them (oClass). You need to change your code to:
>
>
>    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
>
>        Dim oClass As New clsString
>        Dim oClass02 As New clsString
>        Dim oClass03 As New clsString
>
>        oClass.strString = "1"
>
>        Dim oLinkListNode As New LinkedListNode(Of clsString)(oClass)
>        Dim oLinkList As New LinkedList(Of clsString)
>
>        oClass02.strString = "2"
>        oLinkList.AddLast(oClass02)
>
>        oClass03.strString = "3"
>        oLinkList.AddLast(oClass03)
>
>        oLinkList.AddFirst(oLinkListNode)
>
>        DisplayLinkList(oLinkListNode)
>
>    End Sub
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform