I am using C#, I'm fairly new to the language but I have used similar languages before so I understand basic syntax.
I have a 2D array of type Object
. (X
represents what value and Y
is what record) It stores two strings in columns 0 and 1 and a MessageBoxIcon
in 2 and a MessageBoxButtons
in 3.
I would like the ability to swap two records.
I populate a listBox with column 1 every time a change is made to the array. (using a loop) I am happy with this system. I have placed + and - buttons to the side of the listBox but I cannot figure out how to do the code behind it.
I want it so that when I click the + button it bumps the currently selected record up one record. (I.E. It decreases it's Y location and increase the Y coordinate of the record above it) It would need to bump all the values associated with that record.
Could someone provide me with a function to do this?
I hope I explained this well enough.