Конкатенация строк из файлов в случайном порядке ровно за N итераций:
List<string> firstLines = File.ReadLines("first.txt").ToList();
List<string> secondLines = File.ReadLines("second.txt").ToList();
var result = new List<string>();
Random random = new Random();
while (firstLines.Any() && secondLines.Any())
{
int firstIndex = random.Next(0, firstLines.Count);
int secondIndex = random.Next(0, secondLines.Count);
result.Add(firstLines[firstIndex] + secondLines[secondIndex]);
firstLines.RemoveAt(firstIndex);
secondLines.RemoveAt(secondIndex);
}
result.ForEach(Console.WriteLine);
Генерация на каждой итерации случайного числа от 0 до N и проверка на то, было ли такое число раньше, чреваты ощутимым увеличением количества итераций. Для 100 элементов это приводит, в среднем, к 1000 итераций.