Solved

Get value from a generic list

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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