0
在C#中,給定一個表示項目數組索引的整數數組,有沒有辦法獲得與索引對應的項目數組的子數組一步到位?在一個步驟中使用索引數組獲取子數組
int[] indexesArray = {0,2,4,1};
string[] itemsArray = {"hi", "ciao", "yo"," hey","hello"};
string[] result = builtinMagic(itemsArray, indexesArray);
這就是所謂的*切片* –
使用2D /多維數組? – fluffy