LINQ at unityscript?

I tested wrote like this but error says,
Assets/Scripts/Linq1.js(15,25): UCE0001: ‘;’ expected. Insert a semicolon at the end.

import System.Collections.Generic;
import System.Linq;
 
function Start(){
 test();
}
function test(){
 var numbers : int[] = [1, 1, 2, 3, 3];
 var number2 : int[]  = [12,1212, -19, 68, 99, 100];
     var distinct :int = Enumerable.Count(Enumerable.Distinct(numbers));
 
     var numquery = from n in number2
            where n <100 
            select n;
 
    Debug.Log(distinct);  
}

So why unityscript does not recognize [from, in, where, select] linq expression? whileas Enumerable.Count works well in unityscript.

Thanks.

Hi,
as far as I know you can’t use LINQ statements inside javascript.

But this work.

var distinct :int = Enumerable.Count(Enumerable.Distinct(numbers));

AFAIK:

The Linq syntax is a C# (and VB FYI) language feature.

Linq itself is some functions that can be applied to a range of data collections. This can be accessed from any .NET language.