how to create a user defined function?

kingkong

Новичок
Регистрация
17.06.2015
Сообщения
6
Благодарностей
0
Баллы
1
I'm not good at C#, I want to create a custom function in C# code, I tried to create a class, but there has been no success.

if in javascript, just like this:

function myfunction()
{
//do somethings
}


now i want to use c#, then what should I do? can someone do an c# example for me? thanks
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 241
Благодарностей
5 848
Баллы
113
You should insert function into Shared code (action Own code>Using directives and shared code - Shared code tab). There you can describe function, class, method, etc. or you can load description from file with C# code.
Then you will be able call this function in C# code action.
 

kingkong

Новичок
Регистрация
17.06.2015
Сообщения
6
Благодарностей
0
Баллы
1
hi, I didn't find "shared code tab" on OwnCodeUsing panel, how to add this feature? my version is v5.4.3.0
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 241
Благодарностей
5 848
Баллы
113
Последнее редактирование:

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
786
Баллы
113
just loook for lambda functions and context - available from 5.7
lamda functons are available for all demos.
Anonymous classes are available too.
 

kingkong

Новичок
Регистрация
17.06.2015
Сообщения
6
Благодарностей
0
Баллы
1
where to download 5.7 or 5.8 ? i just found 5.4 on zennolab.com
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 241
Благодарностей
5 848
Баллы
113

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