As you don’t provide any code, answering is a bit of quessing:
- Is the array you initialized declared globally or locally? If globally try to move it inside the function (if you want the exact same data in it for each time the function is called).
- If you want to clear the array, depending on type of array, call .Clear() on it. But as long as you don’t modify the content it shouldn’t be necessary. If the array doesn’t expose a Clear() method, use
myArray = null;
1
solved Windows Form Application – Having to close the form and open again? [closed]