This is about
System.Random
, see
http://msdn.microsoft.com/en-us/library/system.random.aspx[
^]. Don't repeat a common mistake, the instance of this class only once (per application domain per runtime).
What means "unique"? Does it mean all 5 should be different? In this case, put all generated values in dictionary (
System.Collection.Generic.Dictionary
); each time check up if the newly added value is already in dictionary. If it is already there, try again, if not add it.
—SA