Question: For an application we are working on I need to generate sample credit card numbers which pass the Luhn algorithm but which are also unique, so we cannot use the sample credit card numbers.

We need to be able to generate around 300 card numbers at a time, and ideally i would be able to do this when generating my input data.

Many Thanks

Answer: 
Do you need the credit card #'s to pass any other tests? i.e. should they look like valid VISA, MasterCard, or AMEX, etc. 

If so, you may want a resource like [Graham King's](http://www.darkcoding.net/credit-card-numbers/) otherwise some of the other suggestions here are good.

The latest version of Graham King's generator (including c# code) can be found on [GitHub](https://github.com/grahamking/darkcoding-credit-card/).
If you need a list to test each card, you'll find one here. [How to test credit card interactions?](https://stackoverflow.com/questions/66880/how-to-test-credit-card-interactions/66988#66988)