tengo una lista definida de esta manera:C# LINQ - No se puede convertir implícitamente IEnumerable <string> a la lista <string>
public List<string> AttachmentURLS;
Estoy añadiendo elementos a la lista como esta:
instruction.AttachmentURLS = curItem.Attributes["ows_Attachments"].Value.Split(';').ToList().Where(Attachment => !String.IsNullOrEmpty(Attachment));
Pero me estoy este error: No se puede convertir implícitamente IEnumerable a la lista
¿Qué estoy haciendo mal?
¿Has intentado agregar un tipo de elenco? instruction.AttachmentURLS = (List) curItem.Attributes ... Oh, por supuesto, me olvidé del método .ToList(). Solo agrega eso hasta el final. –
Nilbert