Re: To create a 12 digit guid?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Try System.Security.Cryptography.RNGCryptoServiceProvider class

JR

"Michael D. Ober" <obermd.@.alum.mit.edu.no.spam> wrote in message
news:hPEmh.6818$w91.4371@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Take a look at the system.random class. There is a method there that will
fill a byte array with random bytes. As for uniqueness, you'll need to
test for that yourself.

Mike Ober.

<twang090@xxxxxxxxx> wrote in message
news:1167777040.797580.322730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for reply, I really appreciate it.
You are right, what I want is to create a random string that is 12
digit length, it has to be unique and I have no idea on how to do this.


Any idea? Many thanks.


Oliver Sturm wrote:
Hello twang090,

Trying to create a 12 digit "guid", but have no idea on how to, anyone
please have any thought? Thanks in advance.

What do you mean by a 12 digit guid? A guid (see here
http://en.wikipedia.org/wiki/Guid or also here
http://en.wikipedia.org/wiki/UUID) is a 16 byte number that is typically
represented by a sequence of 32 characters, representing the 16 bytes in
hexadecimal notation. Some dashes are thrown in for good measure...

So what is it that you want to create? A 12 character random string?


Oliver Sturm
--
http://www.sturmnet.org/blog





.



Relevant Pages

  • Re: To create a 12 digit guid?
    ... As for uniqueness, you'll need to test ... What do you mean by a 12 digit guid? ... represented by a sequence of 32 characters, representing the 16 bytes in ... A 12 character random string? ...
    (microsoft.public.dotnet.general)
  • Re: To create a 12 digit guid?
    ... What do you mean by a 12 digit guid? ... A guid is a 16 byte number that is typically represented by a sequence of 32 characters, representing the 16 bytes in hexadecimal notation. ... Some dashes are thrown in for good measure... ... A 12 character random string? ...
    (microsoft.public.dotnet.general)