Creating GUIDs with C#


The problem with GUIDs was not an easy one to solve with Visual C++, Visual Basic, etc.

To create and view a GUID(globally uniqueidentifier) you had to call the API UUIDCreate() and then callUUIDToString() to transform the GUID into String.

Now with C# you don’t have such sophisticated code.

By the way, you must know that the created GUID is realy globally unique only in case your computer has a Network Adapter.In case it doesn’t, the GUID is only locally unique!

Here is an example of creating a GUID in C#:
Continues…

Pages: 1 2

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

No comments yet... Be the first to leave a reply!