Agregue elementos a la lista de linq var
Tengo la siguiente consulta:
public class CheckItems
{
public String Description { get; set; }
public String ActualDate { get; set; }
public String TargetDate { get; set; }
public String Value { get; set; }
}
List<CheckItems> vendlist = new List<CheckItems>();
var vnlist = (from up in spcall
where up.Caption == "Contacted"
select new CheckItems
{
Description = up.Caption,
TargetDate = string.Format("{0:MM/dd/yyyy}", up.TargetDate),
ActualDate = string.Format("{0:MM/dd/yyyy}", up.ActualDate),
Value = up.Value
}).ToList();
// A continuación, cuando intento agregar vnlist a vendlist, aparece un error, ya que no puedo agregarlo a la lista que recibo y error al decir que tengo algunos argumentos no válidos
vendlist.Add(vnlist);