What is the minimum interface that has the Count property in .Net

Posted by SoMoS on Stack Overflow See other posts from Stack Overflow or by SoMoS
Published on 2010-05-21T07:41:33Z Indexed on 2010/05/21 7:50 UTC
Read the original article Hit count: 308

Filed under:
|
|
|

Hello,

I need to change a method that has one parameter that takes a serie of objects. I need to find the lowest Interface (in inheritance tree) that has the Count property. Until now I was using the IEnumerable but as this has not Count I need to change it to the wider interface possible so the method can work with the biggest number of types of series (collections, lists, arrays, etc).

Thanks in advance.

© Stack Overflow or respective owner

Related posts about collections

Related posts about .NET