When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/(see $code for more information on how to paste your code)
@Denis sorry, does this link work? its winforms, and basically I want to retrieve the data from the textboxes and make an object (Person) out of it and add to an array
And adding it to an array... well, it's a little tricky since you would also need to keep track on the last index you inserted into, so you can then add the object to the next index