C# Scriptable Component Select Method on List not Working

I’m doing some work outside VS and i cannot understand why i keep getting the following error message in the c# scriptable component. I’m simply doing a select method on a list that would work in VS when using the GH SDK.

  1. Error (CS1061): ‘System.Collections.Generic.List’ does not contain a definition for ‘Select’ and no extension method ‘Select’ accepting a first argument of type ‘System.Collections.Generic.List’ could be found (are you missing a using directive or an assembly reference?) (line 67)
private void RunScript(List<string> x, ref object A)
{
    List<string> l = new List<string>();
    foreach (string str in x)
    {
        l.Add(str);
    }

    A = l.Select(v => v).ToList();
    //  A = new List<string> (x.Select(v => v).Distinct().ToList());
}

Select() is an extension method from the System.Linq namespace. I think if you put using System.Linq; in the using block it’ll start working.

thanks that was quick. Yes that works. Thank you.