• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

Accessing property of an object within a collection

I've got a collection of objects and I want to access the value of a property from the object.
I've attached the immediate window below
events[0]
{Basic First Aid for Appointed Person}
    _CourseID: "CT-BF6"
    _Distance: 0.0
    _EndDate: {02/11/2007 08:00:00}
    _Ett_ID: "8374-ct"
    _EventID: "8374-ct"
    _FreePlaces: 1
    _Price: 76.0
    _StartDate: {02/11/2007 08:00:00}
    _VenueID: "T12580"
    Course: {Basic First Aid for Appointed Person}
    CourseID: "CT-BF6"
    Distance: 0.0
    EndDate: {02/11/2007 08:00:00}
    Ett_ID: "8374-ct"
    EventID: "8374-ct"
    FreePlaces: 1
    Price: 76.0
    ShowURL: "./?page=CourseDetails&CourseID=CT-BF6"
    StartDate: {02/11/2007 08:00:00}
    Venue: {Bradford - Carlisle Business Centre}
    VenueID: "T12580"

I want to get the VenueID value

Any help would be appreciated

Thanks Robert
0
Browski
Asked:
Browski
1 Solution
 
MikkkCommented:
Try:
events[0][VenueID]
0
 
BrowskiAuthor Commented:
Mikkk, this doesn't work, you get the message "The name 'VenueID' does not exist in the current context"

0
 
JimBrandleyCommented:
Can you post the code?

Jim
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
BrowskiAuthor Commented:
I've resolved the issue now, the solution is

string venueID = ((w4a._code.CourseEvent)events[0]).VenueID;
lblLocation.Text = FAT.cls.Venue.Get(venueID).Facility;  

Thanks for your time
Robert
0
 
MikkkCommented:
Congratulations. I add it to my KnowledgeBase... :)
0
 
BrowskiAuthor Commented:
Issue was resolved by myself in the end
0
 
Computer101Commented:
PAQed with points refunded (125)

Computer101
EE Admin
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now