C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Unique random numbers based on GUID


Posted Date: 07 May 2007    Resource Type: Code Snippets    Category: Numeric

Posted By: Balamurali Balaji       Member Level: Diamond
Rating:     Points: 10



The GUID class can be used to generate a unique identifier. However, the generated GUID consists of both digits and alphabets. This sample code shows how to generate a unique random number, based on the GUID



Guid uniqueID = Guid.NewGuid();
byte[] bArr = uniqueID.ToByteArray();
int autonum = BitConverter.ToInt32(bArr,0);
MessageBox.Show(autonum.ToString());





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Check whether Number is prime or not
Previous Resource: Generate Random string
Return to Discussion Resource Index
Post New Resource
Category: Numeric


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference call definitions

Contact Us    Privacy Policy    Terms Of Use