Kelvin Loke

Kelvin Loke

  • NA
  • 22
  • 0

Help! Error SetValue - GLOBAL ARRAY, it works

Jun 11 2007 12:36 PM
Hi, I´m trying to create a Global Array, but my code have an error, every time I try to debug I get this error : "Global.SetValue(int, int)': not all code paths return a value "

This is my code:

public Global()

{

arreglo = new int[3000];

}

public static int [] Arreglo

{

get { return arreglo; }

set { arreglo = value; }

}

public static int SetValue(int pos, int value)

{

arreglo[pos] = value;

}

public static int GetValue(int pos)

{

return arreglo[pos];

}

}

Can anyone help me with my problem? Thank you very much.


Answers (10)