I'm creating a C# library and am going to expose a COM interface to it.
I understand the steps requried to do this, i.e.
- Ensure assumbly GUID is assigned, e.g:
[assembly: Guid("dde7717b-2b75-4972-a4eb-b3d040c0a182")]
- Ensure COMVibile attribute is True
- Put a GUID attribute on the class, e.g.
[GuidAttribute("4df74b15-d531-4217-af7e-56972e393904")]
- Register using Regasm.
My question is this. If I have a partial class defined. Do I need to add the GuidAttribute
to both these classes?
In fact, thinking about this, I'm guessing this question applies whatever the attribute (e.g. Serializable
).
Any help would be appreciated. Thanks.