Santosh_DotNet

hi,

i need one algorithm that will generate unique number from a combinations of alphabates/letters/numbers.

if possible please give some example.

Thanks in advance.

Regards,
Santosh.


Re: Visual C# IDE Need Algorithm for generating unique number from letters

Ross Dargan

could you not convert the letters to chars, then convert them to ints. This would always be unique for differant letters and numbers.

I can give an example if you need it, but Im sure a quick google search will pull up the code you need.

Let me know if you would like one and Ill sort it for you.

Ross






Re: Visual C# IDE Need Algorithm for generating unique number from letters

TilakGopi

Hi Santosh,

I couldn't really get ur problem.Could you please give me an example of that unique number with the mentioned combinations(of alphabates/letters/numbers).

what do letters stand for Are they special characters or operators I didn't get.If u can give me the format, i'll try to develope the algo.

Thanx,

Ch.T.Gopi Kumar.






Re: Visual C# IDE Need Algorithm for generating unique number from letters

MarkTheNuke

you could look at the GetHashCode description in the documentation, you will have to convert the characters into bytes to perform the XOR operation, but that SHOULD provide a unique value in most cases.