I\'m currently working on a library that\'s to be exposed to COM for use in a legacy project that\'s being upgraded. I\'m creating interfaces that are to be exposed, and the
You have to put the attribute on the getter and setter individually. Like this:
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
namespace ClassLibrary1 {
[ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IFoo {
int property {
[Description("prop")]
get;
[Description("prop")]
set;
}
}
}
Repeating the description is clumsy, but also required in IDL.