Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 04, 2012 01:47 PM by srinanthuram
Member
100 Points
179 Posts
Feb 02, 2012 07:57 PM|LINK
I need to create a unambiguous random code.
max lenght is 24 char.
How I can do it? I thought to guid but is too long.
Any ideas?
362 Points
81 Posts
Feb 03, 2012 12:03 AM|LINK
please see this
http://www.obviex.com/Samples/Password.aspx
Feb 03, 2012 05:28 AM|LINK
My problem is that this number/code must to be unique like guid but more short.
Contributor
2070 Points
531 Posts
Feb 03, 2012 05:38 AM|LINK
Try these
http://snipplr.com/view/3584/
http://www.eggheadcafe.com/community/csharp/2/10049623/random-numbers.aspx
5131 Points
827 Posts
Feb 03, 2012 04:00 PM|LINK
Hello Mate,
This post may help you
http://forums.asp.net/t/1764721.aspx/1?Generation+of+Unique+Integer+8+Digit+Random+Number+
Cheers.
246 Points
70 Posts
Feb 03, 2012 10:34 PM|LINK
try this
private readonly Random _rng = new Random(); private const string _chars = "abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789"; private string RandomString(int size) { char[] buffer = new char[size]; for (int i = 0; i < size; i++) { buffer[i] = _chars[_rng.Next(_chars.Length)]; } return new string(buffer); }
6800 Points
1549 Posts
Feb 04, 2012 01:47 PM|LINK
hi
see this url
http://forum.unity3d.com/threads/20686-Noob-Question-Random-Number-Ambiguous-reference
thank u
clembo67
Member
100 Points
179 Posts
How create unambiguous random numer
Feb 02, 2012 07:57 PM|LINK
I need to create a unambiguous random code.
max lenght is 24 char.
How I can do it? I thought to guid but is too long.
Any ideas?
fred_b
Member
362 Points
81 Posts
Re: How create unambiguous random numer
Feb 03, 2012 12:03 AM|LINK
please see this
http://www.obviex.com/Samples/Password.aspx
clembo67
Member
100 Points
179 Posts
Re: How create unambiguous random numer
Feb 03, 2012 05:28 AM|LINK
My problem is that this number/code must to be unique like guid but more short.
kirupa.v
Contributor
2070 Points
531 Posts
Re: How create unambiguous random numer
Feb 03, 2012 05:38 AM|LINK
Try these
http://snipplr.com/view/3584/
http://www.eggheadcafe.com/community/csharp/2/10049623/random-numbers.aspx
Ramesh T
Contributor
5131 Points
827 Posts
Re: How create unambiguous random numer
Feb 03, 2012 04:00 PM|LINK
Hello Mate,
This post may help you
http://forums.asp.net/t/1764721.aspx/1?Generation+of+Unique+Integer+8+Digit+Random+Number+
Cheers.
tom22
Member
246 Points
70 Posts
Re: How create unambiguous random numer
Feb 03, 2012 10:34 PM|LINK
try this
private readonly Random _rng = new Random(); private const string _chars = "abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789"; private string RandomString(int size) { char[] buffer = new char[size]; for (int i = 0; i < size; i++) { buffer[i] = _chars[_rng.Next(_chars.Length)]; } return new string(buffer); }srinanthuram
Contributor
6800 Points
1549 Posts
Re: How create unambiguous random numer
Feb 04, 2012 01:47 PM|LINK
hi
see this url
http://www.eggheadcafe.com/community/csharp/2/10049623/random-numbers.aspx
http://forum.unity3d.com/threads/20686-Noob-Question-Random-Number-Ambiguous-reference
thank u