Yin Zhu's answer is correct, I would like to add one detail. In F #, you can call .NET constructors with or without the new keyword. If new omitted, there is no need to add a general parameter, but if you use new , then you must add a general parameter, even if you allow input of type output using the wildcard _ .
So you can say:
> ResizeArray([1; 2; 3;]);; val it : System.Collections.Generic.List<int> = seq [1; 2; 3]
or
> new ResizeArray<_>([1; 2; 3;]);; val it : ResizeArray<int> = seq [1; 2; 3]
but not:
> new ResizeArray([1; 2; 3;]);; new ResizeArray([1; 2; 3;]);; ----^^^^^^^^^^^ C:\Temp\stdin(5,5): error FS0033: The type 'Microsoft.FSharp.Collections.ResizeArray<_>' expects 1 type argument(s) but is given 0
source share