I'm a beginner in coding and my introduction to software development class is teaching Visual Basic 2015.
Assignment tells me that I need to code a click handler so that when the button is clicked, it removes all values from the array, and tells me that I should do this by creating a new array and assigning it to the array variable.
I'm pulling my hair out trying to understand how I'm supposed to code a new array with modular scope in the click handler's private sub.
To do what the assignment asks of me, I think it's much easier to code the array as a list and simply code listname.Clear( ) but I don't think thats what my teacher/the assignment wants me to do.
Can I receive any help?
for example, i've tried creating two arrays (array1 and array2) and putting array1 = array2 in the clickhandler to assign array2's null values to array1 and it only works once.
i've tried using Redim but that doesn't seem to be what the assignment is asking me to do and even if i clear the list, if i enter more values than the upperbound (19) (it has to be 19 for this assignment) i get an exception. (example: if i input 15 values then hit the clear button (redim), and enter 6 values, i get an exception).
Assignment tells me that I need to code a click handler so that when the button is clicked, it removes all values from the array, and tells me that I should do this by creating a new array and assigning it to the array variable.
I'm pulling my hair out trying to understand how I'm supposed to code a new array with modular scope in the click handler's private sub.
To do what the assignment asks of me, I think it's much easier to code the array as a list and simply code listname.Clear( ) but I don't think thats what my teacher/the assignment wants me to do.
Can I receive any help?
for example, i've tried creating two arrays (array1 and array2) and putting array1 = array2 in the clickhandler to assign array2's null values to array1 and it only works once.
i've tried using Redim but that doesn't seem to be what the assignment is asking me to do and even if i clear the list, if i enter more values than the upperbound (19) (it has to be 19 for this assignment) i get an exception. (example: if i input 15 values then hit the clear button (redim), and enter 6 values, i get an exception).
Comment