on 04-01-2016 2:21 PM
Dear Expert
I have developed SAP ByD for a while and wondering that the SDK does not provide any array data type (like in C, JAVA, etc).
Even though the collection type is pretty much the same as it can contain multiple item. But it has limitation for accessing the item member in the list.
For example.
var result : collectionof DataType::StringDataType;
result.Add(bill_to_id);
result.Add(billto_address1);
result.Add(billto_address2);
result.Add(billto_address3);
result.Add(official_name);
Then I need to access item at index 3.
But the syntax which is available for using is just .GetFirst(), GetLast() ....
Can someone please share any idea how to handle this?.
Is it possible to access it like result[2] ? (same as in other programing language)
Best Regards,
Krit R.
A simple foreach should do the trick.
I don't know if there is a straight forward way
var count = 0;
foreach (var item in result)
{
count = count +1;
if (count == 3)
{
//access the item here
item.somevariable...
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.