Solved

Get value from a generic list

Posted on 2010-09-09
2
310 Views
Last Modified: 2012-05-10
Hi,

I return a generic list, but I cannot seem to get a value from the items in the list.
I have the code below.

Would be grateful for any adivice.

Thanks
Dim oNewUserManager As New M04_UserManager
                    Dim oUserList As New List(Of M04_User)
                    oUserList = oNewUserManager.GetAppIDCompIdCompNameForUser(user.ProviderUserKey.ToString)
                    Dim theApplication As String = oUserList.Item(0)

Open in new window

0
Comment
Question by:Soluga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 33635997
Can you try the following:

Dim theApplication As  M04_User= oUserList.Item(0)

theApplication.yourpropertyhere
0
 
LVL 1

Author Comment

by:Soluga
ID: 33636065
Yep that worked.

Thanks a bunch.

Dim oNewUserManager As New M04_UserManager
                    Dim oUserList As New List(Of M04_User)
                    oUserList = oNewUserManager.GetAppIDCompIdCompNameForUser(user.ProviderUserKey.ToString)
                    Dim theApplication As M04_User = oUserList.Item(0)

                    Profile.applicationID = theApplication.ApplicationID.ToString
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

631 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