Solved

Get value from a generic list

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

12 Experts available now in Live!

Get 1:1 Help Now