Need C# snippet help - List difference

  • Автор темы Автор темы nitin2003
  • Дата начала Дата начала

nitin2003

Client
Регистрация
18.09.2012
Сообщения
195
Реакции
11
Баллы
18
Hi,

I am trying to find the difference between 2 lists and add the difference into 3rd list.

I wrote this 1 liner c# snippet :
Код:
Развернуть Свернуть Копировать
project.Lists["List3"] = project.Lists["List2"].Except(project.Lists["List1"]).ToList();

But this is throwing an exception.

"Property or indexer 'ZennoLab.InterfacesLibrary.ProjectModel.Collections.ILists.this[string]' cannot be assigned to -- it is read only". [Row: 1; Column: 1]"

It is not letting me write to the List3. How can I make it save the difference in third list? Can someone please help?

Thanks
Nitin
 
Последнее редактирование:

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)