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:
01545887
Views:
40
Hello Kevin,

Thank you again for your reply.

How would I handle the case of having a link list of classes. I may have just one instance of the class, or I may have multiple instances of the same class. I will never know how many classes I will have, so declaring seperate instances of the same class may not be an option for me

I tried doing the following in code:
        Dim oClass As New clsString

        Dim oLinkListNode As New LinkedListNode(Of clsString)(oClass)
        Dim oLinkList As New LinkedList(Of clsString)

        oClass.strString = "1"
        oLinkList.AddFirst(oLinkListNode)

        oClass.strString = "2"
        oLinkList.AddLast(oClass)

        oClass.strString = "3"
        oLinkList.AddLast(oClass)

        DisplayLinkList(oLinkListNode)
But the display would come back as

"3"
"3"
"3"

So they question is why is the above mentioned code not working for me?

Thank you for youe help on this

Gary



>>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?
>
>It is:
>
>
Dim words() As String = {"the", "fox", _
>            "jumped", "over", "the", "dog"}
>
>Dim sentence As New LinkedList(Of String)(words)
>
>I recommend checking out this link:
>
>http://msdn.microsoft.com/en-us/library/he2s3bh7(v=vs.80).aspx#Y0
>
>Best regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform