2

そのようなプロパティを必要とする COM インターフェイスを実装する必要があります。

public int this[ref object Key]
{
    get { throw new NotImplementedException(); }
}

このコードは MSVS 2010 インテリジェンスによって生成され、コンパイルできません。ref and out are not valid in this context

Resharper でデフォルトの実装を生成すると、次のコードが生成されます。

int IMyInterface.get_Item(ref object Key)
{        
}

しかし、コンパイルすると、コンパイラは次のように主張します。'MyClass' does not implement interface member 'IMyInterface.this[ref object].get'

どうすれば解決できますか?

4

0 に答える 0