Robert wrote: "the algorithms behind MS' implementation are not 
well documented."

Are you talking about the algorithms for and implementation of Type.GUID, or 
are 
you talking about the algorithms for and implementation of UUID / GUID 
generation in general?  Why wouldn't an RFC4122-compliant implementation would 
not be acceptable?






________________________________
From: Robert Jordan <[email protected]>
To: [email protected]
Sent: Sun, August 15, 2010 7:20:06 AM
Subject: Re: [Mono-list] about guid

On 15.08.2010 14:30, Feng Su wrote:
> I compile a file to a assembly. I find the Guids of all classes  is
> 00000000-0000-0000-0000-000000000000.
> How can generate the different Guids for these classes?

You can manually apply a GuidAttribute to these classes, something
like that:

using System;
using System.Runtime.InteropServices;

[Guid("7ADF8247-2749-447E-890C-47BC7B42999F")]
class Program
{
    static void Main ()
    {
        Console.WriteLine (typeof(Program).GUID);
    }
}


Automatic Type.GUIDs are not implemented in Mono, mostly
because the algorithms behind MS' implementation are not well
documented.

Robert

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list



      
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to