Solved

List to list

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
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?
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 …

713 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