MSDN is very helpful in such cases :

http://msdn.microsoft.com/en-us/library/system.random.aspx

Also, remember that you may still get duplicates with your random numbers. Best would be to keep...