What is the Guid attribute that appears above classes in C#?

Andrei picture Andrei · Sep 21, 2010 · Viewed 9.2k times · Source

I've picked up some C# code recently and one of the classes has a Guid attribute present above it. I don't understand what this is or what it's used for.

Can someone give me a rundown of what it is, or just point me in the direction of some articles that give more information about this?

Thanks!

Answer

David Williams picture David Williams · Sep 21, 2010

It is the COM identifier that represents the class in question. The class is designed for COM interop.