Solved

Get value from a generic list

Posted on 2010-09-09
2
306 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
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…
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 …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 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