One way to generate a random serial number in C# is to use the Guid
class, which generates unique identifiers. Here's an example:
main.cs143 chars3 lines
The resulting serialNumberString
will be a random string of 32 hexadecimal digits (i.e. 128 bits) with no hyphens. This should be unique enough for most purposes.
gistlibby LogSnag