Search code examples
c#vb.netdata-structuresarrayslinked-list

How can I transform or copy an array to a linked list?


I need to copy an array to a linked list OR transform the array in a linked list.

How this can be done in .NET (C# or VB)?


Solution

  • Depending on what version we're taking about here, you can :

    LinkedList<YourObjectType> ListOfObjects=new LinkedList<YourObjectType>(YourObjectArray);