Array.Clear() method only resets the array to its default state.
Based on statement
Array.Clear(activeFielderAction, "", activeFielderAction.Length); we may get an error.
The actual statement should be
Array.Clear(activeFielderAction, 0, activeFielderAction.Length);
Also check if you are importing Using.System; namespace.
Try the code below.
int[] activeFielderNumber = new int[10]; activeFielderNumber[1] = 10; activeFielderNumber[2] = 20; string[] activeFielderAction = new string[10]; Array.Clear(activeFielderNumber, 0, activeFielderNumber.Length); Array.Clear(activeFielderAction, 0, activeFielderAction.Length);
Vamsi vithala
source share