c# - Force method to accept different variables in signature -
is there way force method in c# accept arrays/variables of different types in same signature slot or make ignore 1 part of signature?
my code:
private void array_joiner(string[,] newarray, int32[,] matrixarray, string[,] rekursionarray, char[] arrayx, char[] arrayy) { (int16 = 0; < arrayx.length + 1; i++) { newarray[i, 0] = arrayx[i].tostring(); } (int16 = 1; < arrayy.length + 1; i++) { newarray[0, i] = arrayy[i].tostring(); } (int16 y = 1; y < arrayy.length + 1; y++) { (int16 x = 1; x < arrayx.length +1; x++) { newarray[y, x] = matrixarray[y, x].tostring(); } } }
my problem want parse 2 different arrays in slot of int32[,]matrixarray (int32[,] , string[,]) method don't know how. got better idea write 2 different methods? thx in advance.
you declare them array class , work out type of data in arrays , how many ranks have separately.
Comments
Post a Comment