?
Solved

getting fields from a list<>

Posted on 2012-12-27
2
Medium Priority
?
264 Views
Last Modified: 2012-12-27
I have a list and it returns the data I need to fill a grid - but now I need to forward that information to a new page using stubs - I can do that but I cant figure out how to get the information from the list

            MyData.QC q = new MyData.QC();
            List<MyData.QCData> data = new List<MyData.QCData>();
            data = q.GetAllOpen(linekey, sample, tuid);
                foreach(string d in data)
                {
                MessageBox.Show(d);
                }

Open in new window

this doesnt work  - the error is cannot convets list to string - I could use the help if anyone knows - Thanks R
0
Comment
Question by:r3nder
[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 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 38724202
You have a list of MyData.QCData, yet you are attempting to iterate over it as if it were a list of string. See the discrepancy there? Try:

foreach(MyData.QCData d in data)
{
    MessageBox.Show(d.SomePropertyOfQCDataClass);  // change accordingly
}

Open in new window

0
 
LVL 6

Author Closing Comment

by:r3nder
ID: 38724246
Thanks K
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project

800 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