Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

List to list

Posted on 2014-10-21
2
Medium Priority
?
178 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 35

Accepted Solution

by:
it_saige earned 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

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.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
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

886 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