I have this example data
Data: P ,B ,B ,T ,P
This must be something like this
But what is happening to me is this
here's my code
string[,] table = new string[104, 6];
string newPreviousValue = "placeholder";
int xIndex = -1;
int yIndex = 0;
if (result.Equals(newPreviousValue) && yIndex < table.GetLength(1) - 1)
{
yIndex += 1;
table[xIndex, yIndex] = result;
}
else
{
xIndex += 1;
yIndex = 0;
table[xIndex, yIndex] = result;
}
So you won't get confuse the result
variable is the data generator. What could be missing on my condition?
I tried doing something like this
if (result.Equals(newPreviousValue) && result.Equals(newPreviousValueTie) && yIndex < table.GetLength(1) - 1)
but what's happening here is they're all in y axis falling in line .
No comments:
Post a Comment