GUID - UUID .NET/C# - Java RRS feed

  • Question

  • I have a solution that needs to be developed in .NET/C# (on Microsoft Azure) and Java. For the object identifiers (and also the primary keys in the db) I want to use GUIDs or UUIDs. Sometimes the .NET/C# part is the "master" of the creation of new objects and sometimes the Java part is the "master" of the creation of new objects. What are my options to have one of both in both environments? As far as I know there's no .NET UUID datatype similar to the one in Java and no GUID datatype in Java similar as in .NET?

    Any suggestion/help welcome.


    • Edited by Guy Dillen Friday, June 20, 2014 5:27 PM
    Friday, June 20, 2014 5:26 PM


  • Hi,

    Microsoft's GUID is the same thing as a UUID, as defined in a couple of open standards, e.g. RFC 4122.

    In .Net, use System.Guid, and in Java use java.util.UUID, they are both the same 128bit identifier. 



    • Marked as answer by Guy Dillen Friday, July 4, 2014 8:20 PM
    Saturday, June 21, 2014 5:57 AM