Got this problem. I have a form with 4 pictureboxes , when the form loads I want these 4 pictureboxes to be loaded with 4 different images form a textfile. I did it like this:
        optionOne.Image = new Bitmap(questionOne.getFoto(rand));
But if I take this same line of code for all m picture boxes and just change the optionOne to optionTwo (my second pictureBox) for example It just displays the same picture.
I'm getting my pictures from a textfile like this
      public string getFoto(int number)
    {
        stream = File.OpenText("Fotodd.txt");
        string[] fotos;
        string line = stream.ReadLine();
        fotos = line.Split('|');
        return fotos[number];
    }
And I've writen it like this in the textfile:
    1.jpg | 2.jpg | 3.jpg | ...
So how can I load different images in these different pictureBoxes with a textfile?
 
     
    