A type in .NET always has a pointer whether you use this attribute or not. Available through the Type.GUID property. The CLR automatically generates one of the type definitions, ensuring that identical types have the same Guides no matter what machine it is generated on. Please note that this is a completely different behavior compared to the usual way to create Guid.
Only the [Guid] attribute is used if you want to override the automatically generated guid. This is only useful in COM interop scenarios to get an declaration that matches an existing COM interface or class. It should always be next to the [ComVisible] or [ComImport] attribute.
source share