I am using the function Array.Clear()
to empty an array, but it generates an error.
This is the code I was using:
private int[] activeFielderNumber = new int[10];
private string[] activeFielderAction = new string[10];
....
...
....
Array.Clear(activeFielderNumber, 0, activeFielderNumber.Length);
Array.Clear(activeFielderAction, "", activeFielderAction.Length);
The error is:
error CS0103: The name `Array' does not exist in the current context
How can I solve this problem?
Try this
Array.Clear(yourArray, 0, yourArray.Length);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With