Solved

List to list

Posted on 2014-10-21
2
135 Views
Last Modified: 2014-10-22
I am trying to find a list in a list of lists
and transfer that list to an other list
but I get the error Cannot implicitly convert type myServer..DownholeEquipment to systems.Collection.Generic.List<myserver..DownholeEquipment>
anyone know why/

 DownholeEquipmentView = new List<myServer.DownholeEquipment>();
            var results = currentDownholeEquipment.Find(c => c.ID == (uint)index);
            DownholeEquipmentView = results;//myServer.GetDownholeEquipment(index);

Open in new window

0
Comment
Question by:r3nder
2 Comments
 
LVL 33

Accepted Solution

by:
it_saige earned 500 total points
ID: 40396067
Probably better to use something like:
DownholeEquipmentView = new List<myServer.DownholeEquipment>();
DownholeEquipmentView = (from equipment in currentDownholeEquipment where equipment.ID == (uint)index select equipment).ToList();

Open in new window


-saige-
0
 
LVL 6

Author Closing Comment

by:r3nder
ID: 40396835
Thank you IT worked like a chanp
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

809 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