can some1 help me to fix this
can someone help me? i got error code at maxIndex
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in ItemTableReader.exe
BinaryReader br = new BinaryReader(s);
toolName = br.ReadBytes(48);
version1 = br.ReadInt16();
version2 = br.ReadInt16();
updateTime.Load(s);
userName = br.ReadBytes(16);
comName = br.ReadBytes(20);
int cont = BOOL.TRUE; //continue
sbyte type;
uint size; //why sbyte tho
short count;
short maxIndex;
int cnt = 0;
int tmpCnt = 0;
string tst = "";
do
{
cnt = 0;
type = br.ReadSByte();
size = br.ReadUInt32();
count = br.ReadInt16();
maxIndex = br.ReadInt16();
MaxItemCount[type] = maxIndex; <===== i got error right here
ItemType itemType = (ItemType)type;
byte[] arr = null;
tst += string.Format("{0}: \t{1}\n", itemType, size);
switch (itemType)