Using List and Dictionary with UnityScript ?

Hi

I am converting a C# script into Unityscript and I am wondering if I can use the generic List and Dictionary<Type, Type> ?
If yes, which syntax should I use ?

Right know I have something like this :

import System.Collections.Generic;
var myVariable = List(Dictionary(String, String));

And it throws me the following error :
BCE0157: Generic types without all generic parameters defined cannot be instantiated.

I tried many possibilities, mixing the Boo syntax as well but with no luck so far.

Would using List and Dictionary instead built in Arrays and Hashtable alter the performance of the script ?

Thanks for anyone who can help me.

It’s the C# syntax, with an extra “.”.

var blah = new List.<int>();

http://unity3d.com/support/documentation/Manual/MonoUpgradeDetails.html

–Eric

Indeed, I discover that right after hitting the “submit” button :roll_eyes: (see that topic : http://forum.unity3d.com/threads/80203-can-someone-explain-to-me-why-this-does-not-work ) but it does not work with a List of Dictionaries

In C# :

List<Dictionary<string, string>> myVariable = new List<Dictionary<string, string>>();

In JS :

var myVariable = List.<Dictionary.<String, String>>()

It gets me an error with “>>”.

Edit : answer here : http://forum.unity3d.com/threads/80227-Creating-a-Dictionary-of-Lists-in-Javascript (I even had the topic open in a tab all that time… shame on me)
White space makes a difference, the right syntax is :

var myVariable = List.< Dictionary.<String, String> >()

Thanks Eric.