I could see that your code works fine, all conditions are met. Actually, I felt pain reading your code. Try to understand what I've done here, it is just what you need:
using System;
using System.Linq;
string[][] friendFamilies = new string[][]
{
new string[] { "khzix","rengar","shaco" },
new string[] { "jhin","tf","karma" },
new string[] { "qiyanna","braum","thresh" }
};
var allFriends = friendFamilies.SelectMany(x => x);
foreach (var friendToGreet in allFriends)
{
foreach (var friendWhoGreet in allFriends.Where(x => x != friendToGreet))
{
Console.WriteLine($"Hey {friendToGreet} this is {friendWhoGreet}.");
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…