Welcome to collectivesolver - Programming & Software Q&A with Examples. A website you can trust. All programs tested and work.

Contact: aviboots(AT)netvision.net.il


Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Dental Dog Chews
FRESH BREATHIES

GlucoTrust is a brand new, science-backed supplement that supports healthy blood sugar levels AND weight loss for men and women

Everything you need to sell anywhere

Managed VPS Hosting
Affordable. Secure. Your Own Virtual Private Hosting. Faster than AWS and Rackspace

Bonsai Boy of New York Bonsai Trees and Accessories
100%

Disclosure We are a professional Programming & Software Q&A website, that receives compensation from some of the links whose we show you with Information. It means that my content may contain affiliate links.

24,887 questions

32,502 answers

573 users

How to remove the last node from linked list in VB.NET

1 Answer

0 votes
Imports System
Imports System.Collections.Generic

Public Class Program
    Public Shared ll As LinkedList(Of String)

    Public Shared Sub PrintLinkedList()
        For Each obj As Object In ll
            Console.Write("{0} ", obj)
        Next
    End Sub

	Public Shared Sub Main()
        ll = New LinkedList(Of String)()
	
		ll.AddLast("vb.net")
        ll.AddLast("c#")
        ll.AddLast("c")
        ll.AddLast("c++")
        ll.AddLast("java")
        ll.AddLast("python")
	
        PrintLinkedList()
	
		ll.Remove(ll.Last)
	
        Console.WriteLine()
	
        PrintLinkedList()
    End Sub
End Class





' run:
'
' vb.net c# c c++ java python 
' vb.net c# c c++ java
'

 




answered 3 days ago by avibootz
...