This was asked in 2011 and also has an accepted answer. –Umair Farooq Sep 2 at 12:56 add a comment| Your Answer draft saved draft discarded Sign up or log Since both are generics, you can do like below, IEnumerable
Zener diodes in glass axial package - not inherently shielded from photoelectric effect? Make sure this using is at the top of your C# file: using System.Linq; Then use the ToList extension method. Do Morpheus and his crew kill potential Ones? Is Area of a circle always irrational What is a satisfactory result of penetration testing assessment? http://stackoverflow.com/questions/2853647/c-sharp-linq-cannot-implicitly-convert-ienumerablestring-to-liststring
Tie-rod final test What is this c. 1948 private plane with a sliding canopy? The compiler is told that GetHistory returns IEnumerable, and even though it is a list, it doesn't know that. But I guess I don't get this casting scenario.Reply Daniel Schaf... What is role of palladium in hydrogenation reactions?
If a wondrous item was dynamically created as slimy, can I remove the smell with prestidigitation? How often should I replace windscreen wiper blades? Why is the 'You talking to me' speech from the movie 'Taxi Driver' so famous? Linq Cannot Implicitly Convert Type Anonymous hhDbRoleProvider roleProvider = new hhDbRoleProvider(); Or whatever constructor or method you have of instantiating hhDbRoleProvider.
Regards, A.MuruganIf it solved your problem,Please click "Mark As Answer" on that post and "Mark as Helpful". Polyglot Anagrams Cops' Thread Safety - Improve braking power in wet conditions Tie-rod final test Skyrim: How to stop NPCs from picking up dropped items What is this line of counties GO OUT AND VOTE On which point(s) in a jet engine does the reaction force act? Drawing a torso with a head (using \draw) How much time would it take for a planet scale Miller-Urey experiment to generate intelligent life How to prove that authentication system works,
Show that the square matrix A is invertible Why did Borden do that to his wife in The Prestige? How To Convert List To Ienumerable In C# Not the answer you're looking for? How to delete the lines from a file that do not contain dot? Reply dba123 Member 116 Points 1339 Posts Re: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable
share|improve this answer edited Jun 26 '12 at 12:27 answered Jun 26 '12 at 12:18 Branko Dimitrijevic 35.3k24695 add a comment| up vote 1 down vote Here is the error List
Can Trump undo the UN climate change agreement? Get More Info more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Oh of course, I forgot about the .ToList() method. An explicit conversion exists (are you missing a cast?) And i don't understand why. Cannot Convert List To Ienumerable
What is this line of counties voting for the Democratic party in the 2016 elections? C# Web Developer Edited by NoEgo Tuesday, October 04, 2011 10:41 PM Tuesday, October 04, 2011 10:27 PM Answers 0 Sign in to vote Hi NoEgo, Welcome! Why did Borden do that to his wife in The Prestige? useful reference But moving on, I now get this: hhDbRoleProvider roleProvider; List
May 17 '10 at 23:31 3 Yes, you can remove it. –smoak May 17 '10 at 23:38 add a comment| up vote 7 down vote Move the .ToList() to the Cannot Implicitly Convert Type To System Collections Generic List Why are wavelengths shorter than visible light neglected by new telescopes? Is there still a way to prevent Trump from becoming president?
Why are wavelengths shorter than visible light neglected by new telescopes? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Join them; it only takes a minute: Sign up Converting from IEnumerable to List up vote 129 down vote favorite 15 I want to convert from IEnumerable
Drawing a torso with a head (using \draw) How often should I replace windscreen wiper blades? Show that the square matrix A is invertible Are there still systems around with a /bin/sh binary? How can I do this? this page You can typecast a List to an IEnumerable, but not the other way around.
May 23, 2008 05:12 PM|Daniel Schaffer|LINK If the method signature says IEnumerable, then that's what it is returning. Finally, the beauty of linq is that you don't even have to write the for loop. We don't need the source of your whole project for such a compilation error. –Kek Jun 26 '12 at 12:07 possible duplicate of IEnumerable
Does the electoral vote count ever get reallocated between states? What is the point of update independent rendering in a game loop?