AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.09.2018, 08:24   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
ievgensaxblog: MSDyn365FO. How-to pass generic types to .Net method
Источник: https://ievgensaxblog.wordpress.com/...to-net-method/
==============



There is a wonderful blog post about Generic types in X++. And as It says, the easiest way to work with generic types in X++ is to create .Net library and expose non-generic interface, because X++ compiler has lots of limitations.

However, if you really want to have some fun and stick to X++, it’s possible with a help of reflection.

Let’s say we have a C# class that accepts  List and we want to invoke it from X++:

public class Class1{ public static string myMethod(List list) { string res = string.Empty; foreach (var array in list) { foreach (string s in array) { res += s; } }return res; }}We cannot simply declare:

var stringList = new System.Collections.Generic.List();
Looks like X++ parser cannot handle “
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
ievgensaxblog: D365FOE. How to override form data source field lookup method. Blog bot DAX Blogs 0 10.01.2018 05:11
goshoom: Generic types in X++ (AX 7) Blog bot DAX Blogs 0 10.04.2017 13:11
Navigate Into Success: Try..Catch for .NET Interoperability Blog bot Dynamics CRM: Blogs 0 29.10.2014 09:00
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
fed: Net requirements update in MRP Module and Working Set of MRP Blog bot DAX Blogs 14 08.05.2012 13:09
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:42.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.