How to Convert from IList to List

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Благодарностей
11
Баллы
18
I try to use 2 zenno lists in ProjectMaker to work with a custom function in OwnCode through a C# Code snippet but I get this error:



I call my custom function from inside the C# block like this:

and I declare my OwnCode function like this:

Код:
public static string TextProcessor(string textIn, List<string> list1, List<string> list2, string mainLink){
...code here...
}
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 226
Благодарностей
5 844
Баллы
113
You used wrong types. Objeck List<string> can't be connected to Ilist.
Here is correct example:
Код:
List<string> keywords = project.Lists["list1"].ToList();
List<string> trustedLinks = project.Lists["list2"].ToList();

string finalText = ZennoLab.OwnCode.CommonCode.TextProcessor(text, keywords, trustedLinks, link);
return finalText;
 
  • Спасибо
Реакции: zenfreak

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Благодарностей
11
Баллы
18

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