Generating a GUID

Q: How can I create a unique value without using a counter?

A: The .Net framework provides a method for generating a universally unique identifier or GUID and can be accessed as shown below:

Dim strGUID as String = System.GUID.NewGuid().ToString()

GUID is short for Globaly Unique Identifier. This number is
based on IP address, MAC address, and date/time. It's represented as a series of alpha-numeric characters in the format {8-4-4-4-12}.

Using the NewGuid() method allows unique numbers to be generated by one function call, without concern for repeating identifiers or counters.

Comments

Popular posts from this blog

Working with double quotes (") in VB.Net

Using VB Script to display part of an IP address

Sep '19 Announcements