Remove item from generic list

Posted on 2013-10-31
Last Modified: 2013-10-31

I am trying to remove an item from a generic list, I have been using the code below but it does not remove the item.

 _oM04_UserManager = New M04_UserManager
                Dim oM04_UserList As List(Of M04_User)
                oM04_UserList = _oM04_UserManager.GetAllUsersForAllCompanies(_userId)
                oM04_UserList.RemoveAll(Function(p As M04_User) p.UserID = "5833aeb8-13e7-44e5-b60d-600395f5cdab")

Would be grateful for any advice

Question by:Soluga
LVL 44

Accepted Solution

AndyAinscow earned 500 total points
ID: 39613982
Does the list actually have an item with that exact ID ?

Author Closing Comment

ID: 39614108


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

21 Experts available now in Live!

Get 1:1 Help Now