D David Pope Feb 15, 2005 #1 I need to create a UNIQUE number similar to a GUID but all numbers. Does anyone know of an algorithm or anything? TIA, Dave
I need to create a UNIQUE number similar to a GUID but all numbers. Does anyone know of an algorithm or anything? TIA, Dave
G Guest Feb 15, 2005 #2 Hi David, In case you are looking at how to create GUID, then the framework has a class called System.Guid, which does this... Very simple... Have a look at these links....for code snippets http://www.csharphelp.com/archives/archive188.htm http://msdn.microsoft.com/library/d...n-us/cpref/html/frlrfSystemGuidClassTopic.asp In case you want to write / use algorithm for generating the number, then check this link for code snippet in C#... http://www.c-sharpcorner.com/1/unique.asp HTH, Need any help, do post a msg back.. Happy Coding
Hi David, In case you are looking at how to create GUID, then the framework has a class called System.Guid, which does this... Very simple... Have a look at these links....for code snippets http://www.csharphelp.com/archives/archive188.htm http://msdn.microsoft.com/library/d...n-us/cpref/html/frlrfSystemGuidClassTopic.asp In case you want to write / use algorithm for generating the number, then check this link for code snippet in C#... http://www.c-sharpcorner.com/1/unique.asp HTH, Need any help, do post a msg back.. Happy Coding
F Felipe Feb 16, 2005 #3 Hi David How about System.DateTime.Now.Ticks it gives you a unique number as long as the number is not created too rapidily..... just an idea....
Hi David How about System.DateTime.Now.Ticks it gives you a unique number as long as the number is not created too rapidily..... just an idea....