Skip to content

Gendarme.Rules.Interoperability.Com.ComVisibleTypesShouldBeCreatableRule(2.10)

Sebastien Pouliot edited this page Jan 22, 2011 · 2 revisions

ComVisibleTypesShouldBeCreatableRule

Assembly: Gendarme.Rules.Interoperability.Com
Version: 2.10

Description

This rule checks for ComVisible reference types which have a public parameterized constructor, but lack a default public constructor.

Examples

Bad example:

[ComVisible (true)]
public class BadClass {
    public BadClass (int param) {
    }
}

Good example:

[ComVisible (true)]
public class GoodClass {
    public GoodClass () {
    }
    public GoodClass (int param) {
    }
}
Clone this wiki locally