internal static string InternalEvaluateDiagonalRow(this string[,] matrix, int pivotX, int pivotY) { var listValues = new List <string>(); var pivot = matrix.GetCharacter(pivotX, pivotY); listValues.Add(pivot); string nextCharacter; do { pivotX -= 1; pivotY += 1; nextCharacter = matrix.GetCharacter(pivotX, pivotY); if (!string.IsNullOrEmpty(nextCharacter)) { listValues.Add(nextCharacter); } } while (nextCharacter != null); return(string.Join(string.Empty, listValues)); }