Should be relativly simple but I cant figure it out, i have the following:

  public static List<T> GetList <T>(dynamic data)
    {
        var lst = new List<T>();

        foreach (var d in data)
        {
            lst.Add(new T { Value = d.Id.ToString(), Text = d.Name };);
        }

        return lst;
    }

errror:

enter image description here

Related posts

Recent Viewed