C# に変換しようとしている VB6 のプロパティがあります。それは次のとおりです。
Public Property Get NewEnum() As IUnknown
'this property allows you to enumerate
'this collection with the For...Each syntax
Set NewEnum = m_coll.[_NewEnum]
End Property
m_coll
はプライベート変数ArrayList
で、以前の の代わりに になりましたCollection
。
m_coll
私自身のクラスオブジェクトの1つが取り込まれています。ご覧のとおり、このプロパティはIUnknown型です。
この時点では適切に考えていないだけかもしれませんが、C# でこの種のプロパティに相当するものはありますか?