Multidimensional array syntax
Posted: Tue Jan 25, 2022 7:54 am
Dear fellow X#'ers!
In times of collections and lists I barely have any need for it but what's the syntax for creating and initializing a multidimensional .NET array?
I tried something like
It's very embarrassing but what is the correct syntax?
TIA,
Bernhard
(X# 2.9)
In times of collections and lists I barely have any need for it but what's the syntax for creating and initializing a multidimensional .NET array?
I tried something like
Code: Select all
LOCAL aData AS STRING[,]
aData := <STRING>{ {"OneOne", "OneTwo"}, {"TwoOne", "TwoTwo"} } // Doesn't work
aData := STRING[,]{2,2} { {"OneOne", "OneTwo"}, {"TwoOne", "TwoTwo"} } // Nor this
aData := STRING[,]{2,2} { <STRING>{"OneOne", "OneTwo"}, <STRING>{"TwoOne", "TwoTwo"} } // Nor this
TIA,
Bernhard
(X# 2.9)