Solved

List to list

Posted on 2014-10-21
2
141 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 …

839 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