Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I want to create a uuid using vb,net how to do it
Posted

GUIDs identify objects such asinterfaces and class objects. A GUID consists of one group of 8 hexadecimaldigits, followed by three groups of 4 hexadecimal digits each, which arefollowed by one group of 12 hexadecimal digits.

In the following script, Imanually generate the GUID that I can use later in the application by usingVB.NET:
Private Sub GenerateGUID()

        Dim sGUID As String
        sGUID = System.Guid.NewGuid.ToString()
        MessageBox.Show(sGUID)

    End Sub

In the example, I define a string variable, sGUID, to hold aGUID that I will generate. Then I set the value of sGUID to the value returned bythe System.Guid.NewGuidmethod (using the System.Guidnamespace) and convert the result to a string using ToString(). The result is displayed in a messagebox.
 
Share this answer
 
GUIDs are not UUIDs.

See the StackOverflow article, How can I generate UUID in C-sharp, for the differences in byte ordering between real UUIDs and Microsoft's GUIDs.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900