« XML shaping in .NET | Main | Scoble and Randy Holloway on marketing »

November 18, 2004

Property helpstrings in .NET/COM interop

If you're exposing a .NET class to COM and want to provide helpstrings, you use the DescriptionAttribute.

This works fine for methods, but appears to be ignored on properties.

The trick is to apply the DescriptionAttribute to the get/set declarations, not the property itself:

public interface IPenguin
{
  int Airspeed
  {
    [Description("Gets the airspeed")] get;
    [Description("Sets the airspeed")] set;
  }
}

November 18, 2004 in Software | Permalink

TrackBack

TrackBack URL for this entry:
https://www.typepad.com/services/trackback/6a00d8341c5c9b53ef00d83540528169e2

Listed below are links to weblogs that reference Property helpstrings in .NET/COM interop:

Comments