public int BeginContainer() { if (!SpaceIsValid()) { throw new Error(ErrorCode.INVALID_POS); } if (!io.Read()) { throw new Error(ErrorCode.IO_READ); } if (!io.IsArray()) { //special 'unspecified' case if (io.IsSigned() && io.ValueSigned == -1) { structs_pos.Push(new StructPos(-1)); return(-1); } else { throw new Error(ErrorCode.TYPE_MISMATCH, "Got type: " + io.Type); } } int len = (int)io.Length; structs_pos.Push(new StructPos(len)); return(len); }