The book of inspiration

February 10, 2008

C# To ActionScript, Initial LINQ Support

Filed under: jsc — Tags: , , , , , — zproxy @ 5:18 pm

I am introducing LINQ for ActionScript – you can now start writing your flash applications in c# using linq and convert it to actionscript via jsc compiler.

How does the generated code compare to the original

In c# the code looks like this:

foreach (var v in from i in __users

where i.Trim().ToLower().Contains(user_filter)

select i.Trim())


result.text += “result: “ + v + “\n”;


The generated ActionScript looks like this:

enumerator_15 = __Enumerable.Select_100663437(__Enumerable.Where_100663439(SZArrayEnumerator_1.op_Implicit_100664110(__users), new __Func_2(CS___8__locals15, __IntPtr.op_Explicit_100665307(“__ctor_b__8_100663306”))), FlashLinqToObjects___c__DisplayClassf.CS___9__CachedAnonymousMethodDelegate13).GetEnumerator_100664907();



while (enumerator_15.MoveNext_100665359())


v = enumerator_15.get_Current_100665499();

this.result.text = this.result.text+ “result: “+ v+ “\x0a”;





if (!(enumerator_15 == null))





New example project:

Download latest the jsc version here.



  1. Could you put up an example of making a remote Ajax request to a web service? I’ve had a look through svn but can’t find anything on how to make external calls. thanks!

    Comment by Harry — February 18, 2008 @ 6:08 pm

  2. There is an example for a ajax Web Site over here. I will try to verify that actually it works with the latest jsc on this weekend. Cheers.

    Comment by zproxy — February 18, 2008 @ 6:34 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Blog at

%d bloggers like this: