« 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 URL for this entry:

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