Источник:
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 “