Just to add to what F-ES Sitecore said: don;t create a new random instance each time you want to use it: create one (possibly
static
instance and use that instead.
Because Random instances are initialized with the current system Tick count when they are created, generating a new one inside a method can give you problems, like the same value sequence being generated each time - and the problem gets worse as processors get faster.
private static Random num = new Random();
public void RandomImage()
{
string[] flags = { "Afghanistan", "Albania", "Algeria", "Andorra"};
CorrectFlag = flags[num.Next(0, flags.Length)];
}