How to define function to return array of Strings
What should I change here to make it compileable:
What should I change here to make it compileable:
Code:
static String* _clearEmpty(String* arr[]){
String * tempArray[] = new String*[arr->Length];
IEnumerator* myEnum = arr->GetEnumerator();
int i = 0;
while (myEnum->MoveNext()) {
String* str = __try_cast<String*>(myEnum->Current);
if(str!=S""){
tempArray[i] = str;
i++;
}
}
return tempArray;
}