You should replace structwith an array of 5 elements.
If you want, you can wrap an array in a class with five properties.
edit...
"Wrap", , , , , ( use here = 'wrap a object'). . "" -.
:
class test
{
int[] e = new int[5];
public void Hello(int index)
{
for (int i = 0; i <= 4; i++) {
if (i + index > 4) {
MsgBox("Original code would have overwritten memory. .Net will now blow up.");
}
e[i + index] = i;
}
}
public int e1 {
get { return e[0]; }
set { e[0] = value; }
}
public int e2 {
get { return e[1]; }
set { e[1] = value; }
}
}