Typecast each object in an array on a single line of code, using LINQ?

Var upgradedUsers = downgradedUsers.Cast() Append a call to ToArray() if you want upgradedUsers as an array, of course.

Var upgradedUsers = downgradedUsers.Cast(); Append a call to ToArray() if you want upgradedUsers as an array, of course.

Guess I kind'a missed that method. Thanks :) – roosteronacid May 6 '09 at 0:49 Yeah, LINQ has lots of goodies that are easy to miss... This is a particularly useful one. :) – Noldorin May 6 '09 at 0:51.

Use the cast method.... SampleIntList = SampleStringList.Cast(). Select(x => Convert. ToInt32(x)).ToList().

Also any of stackoverflow.com/questions/809533/impli... methods should work.

Append a call to ToArray() if you want upgradedUsers as an array, of course. SampleIntList = SampleStringList. Select(x => Convert.

Also any of http://stackoverflow.com/questions/809533/implicit-operators-linq-and-lambda-expressions-can-make-code-less-readable-but methods should work. Terms of service. Not the answer you're looking for?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions