I read lines from txt file. They are about 100 000. How to fill queue and shuffle its elements? Fill queue like this:
Queue<string> accs = new Queue<string>();
private void loadLikeAccountsToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.RestoreDirectory = true;
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
accs.Clear();
foreach (string s in File.ReadAllLines(openFileDialog1.FileName))
{
accs.Enqueue(s);
}
label4.Text = accs.Count.ToString();
}
}