x


Do Lambda Expressions and/or LINQ work on mobile platforms?

I was told by someone in the IRC room that these break down into "expression trees", which the mobile platforms do not support.

Doing searches in here and the forums haven't resulted in any second opinions, so I thought I'd ask directly.

Has anyone used the Fluent syntaxes and/or Query Expressions in LINQ and had them successfully compile on the mobile platforms?

more ▼

asked Mar 26 '11 at 05:15 AM

tylo gravatar image

tylo
297 5 9 18

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It should work fine with anonymous delegates, e.g.

var fives = yourEnumerator.Where(delegate(int x) { return x == 5; });

With some extra testing, basic lambdas work

var fives = yourEnumerator.Where(x=>x==5);

There are some still a few issues, but you can code around those most likely

more ▼

answered Mar 26 '11 at 08:29 AM

Mike 3 gravatar image

Mike 3
30.6k 10 67 254

Darn it, Mike! :P

Mar 26 '11 at 06:09 PM tylo

Thanks for explaining the anonymous delegates though. The book I had painted them as being a lot more ugly than that.

Mar 26 '11 at 06:09 PM tylo

Edited the answer :)

Mar 28 '11 at 01:59 PM Mike 3
(comments are locked)
10|3000 characters needed characters left

Older question but I thought I'd add my experience.

I work on a unity 3.5.X project that targets desktop and Android (specifically touchscreen PCs and Android tablets). We use Linq extensively in out project and have not run into any issues yet.

That being said the client side queries are quite simple (where, min, max, orderby, select). We do use a lot of the extension methods as well (ToList, SelectAtIndex etc). Haven't had a problem yet (other than MonoDevelop completion not being up to par with VisualStudio).

Haven't targeted iOS, so I can't speak to that.

more ▼

answered Feb 15 at 08:09 PM

dubbreak gravatar image

dubbreak
382 4 7

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x29
x2

asked: Mar 26 '11 at 05:15 AM

Seen: 1730 times

Last Updated: Feb 15 at 08:09 PM