I have a string
string cubeinline = "12345123451234X1234512345";
which is equal to a List<string>
List<string> cube = new List<string>(){ "12345",
"12345",
"1234X",
"12345",
"12345"};
But different arranged. The string is split by length. In this case 5.
Now i need to compare the string with the List - char by char. But my method says every char is invalid.
int maxLength = 5;
for (int i = 0; i < cubeinline.Length; i++)
{
if (cubeinline[i] == cube[i / maxLength][i % maxLength])
{
Console.WriteLine("Error in char" + i);
}
}