Metni satır satır inceleyip karıştıran csharp kodu alternatifidir.
public static string MetniSatirSatirInceleVeKaristir(string metin)
{
string[] dizi = metin.Split('\n');
SortedDictionary<double, string> dict = new SortedDictionary<double, string>();
Random r = new Random();
for (int i = 0; i < dizi.Length; i++)
{
dict.Add(r.Next(0, dizi.Length - 1), dizi[i]);
}
System.Windows.Forms.MessageBox.Show(dict[0]);
StringBuilder sbd = new StringBuilder();
for (int i = 0; i < dizi.Length; i++)
{
sbd.AppendLine(dict[i]);
}
return sbd.ToString();
}