I have in axapta method that return List<Array>
. How can I convert it on c# side and for what ? It it possible to convert it to c# List<开发者_如何学Python;ArrayList>
? I see example for container:
ArrayList magazynierzy = new ArrayList();
for (int i = 1; i <= axContainer.Count; i++)
{
magazynierzy.Add(axContainer.get_Item(1).ToString());
}
I think there are some significant flaws with this question, but taking it that you have some external process return in list of things, they are easily turned into a list of objects. You should define or identify a class that matches the items you have returned, and create a list of these. So something like:
List<string> magazynierzy = new List<string>();
while(axContainer.ReadNext())
magazynierzy.Add(axContainer.get_Item(1).ToString());
return magazynierzy;
would give you what you need ( I don't know axapta, so I have no idea how you move through the list ). If you need more complex objects, declare a class of struct for them, with a constructor that will take an axContainer object, or a list of parameters which you can pass various get_Item(n) entries into.
精彩评论