Link to home
Start Free TrialLog in
Avatar of TimPeer
TimPeer

asked on

GUID based on Timestamp

I wish to generate a GUID based on the time stamp. Are there examples in CSharp that will demonstrate this?

Many thanks!
ASKER CERTIFIED SOLUTION
Avatar of phoffric
phoffric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimPeer
TimPeer

ASKER

Thank you. This solution uses CoreDLL which seems included in Windows CE but is not included in Windows XP, Server editions, etc.

Do you have link for a solution which will run on Windows XP and the various Service OS'?

Thanks again!
Sorry. That was the only C# code I found.
Avatar of TimPeer

ASKER

I closed this in error.
Avatar of TimPeer

ASKER

Thanks. i will issue the points anyway thought I have a solution.

Guid g;
g = Guid.NetGuid();

The time stamp though it would have been elegant really isn't necessary.
Take a look at the references to time here:
   http://en.wikipedia.org/wiki/Globally_unique_identifier#Algorithm
and in the paragraph, following, "Sequential algorithms", and also, this article:
   http://blogs.msdn.com/b/oldnewthing/archive/2008/06/27/8659071.aspx