Ambiguous Class Members In

- 1 answer

I am trying to use a class from a C# assembly in The class has ambiguous members because is case insensitive. The class is something like this:

public class Foo {

  public enum FORMAT {ONE, TWO, THREE};

  public FORMAT Format {
    get {...}
    set {...}

I try to access the enum: Foo.FORMAT.ONE

This is not possible because there is also a property named 'format'.

I can not change the C# assembly. How can I get around this and reference the enum from



I don't think you can get around this. Get in touch with the author of the C# component you are trying to use and convince them to fix their code.

Incidentally, this is the primary reason behind the CLSCompliant(true) attribute, which if you are writing APIs or other code that has a high probability of being used by other languages you should always set. It would have flagged this issue for the original author to be aware of and fix correctly.