We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

GUID based on Timestamp

TimPeer
TimPeer asked
on
Medium Priority
489 Views
Last Modified: 2012-05-11
I wish to generate a GUID based on the time stamp. Are there examples in CSharp that will demonstrate this?

Many thanks!
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
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!
CERTIFIED EXPERT

Commented:
Sorry. That was the only C# code I found.

Author

Commented:
I closed this in error.

Author

Commented:
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.
CERTIFIED EXPERT

Commented:
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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.