By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,467 Members | 1,619 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,467 IT Pros & Developers. It's quick & easy.

List<T> and IList interface

P: n/a
According to the documentation, the List<T> type explicitly implements the
non generic IList interface.

The problem is that no matter how hard I look, I am not able to find this
implemetion on the List<T> type. Could some one tell me where can I find the
IList implementation?

Please note that the plase where I am looking for this implementation is
from the Visula Studio metadata information page. The page that shows up
when you right-click on the "List<T>" word and then click on the "Go To
Definition" menu item.

This has to be something very stupid of my part, what am I missing?
May 15 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
KH
The IList members are implemented explicitly ("explicit interface
implementations" in msdn) -- so they will only be available when treating the
List<T> as a non-generic IList:

// disclaimer: untested code

System.Collections.IList list = new System.Collections.Generic.List<T>();
list.Add( new Object() );
"Rene" wrote:
According to the documentation, the List<T> type explicitly implements the
non generic IList interface.

The problem is that no matter how hard I look, I am not able to find this
implemetion on the List<T> type. Could some one tell me where can I find the
IList implementation?

Please note that the plase where I am looking for this implementation is
from the Visula Studio metadata information page. The page that shows up
when you right-click on the "List<T>" word and then click on the "Go To
Definition" menu item.

This has to be something very stupid of my part, what am I missing?

May 15 '06 #2

P: n/a
I already knew that, my question was: Where is that implementation on the
List<T> metadata? I don't see it. I should be able to see the explicit
implementation such as:

int IList.Add(object value);

take a second to re-read my original post a little more carefully and you
will see what I mean.

Thanks.
"KH" <KH@discussions.microsoft.com> wrote in message
news:12**********************************@microsof t.com...
The IList members are implemented explicitly ("explicit interface
implementations" in msdn) -- so they will only be available when treating
the
List<T> as a non-generic IList:

// disclaimer: untested code

System.Collections.IList list = new System.Collections.Generic.List<T>();
list.Add( new Object() );
"Rene" wrote:
According to the documentation, the List<T> type explicitly implements
the
non generic IList interface.

The problem is that no matter how hard I look, I am not able to find this
implemetion on the List<T> type. Could some one tell me where can I find
the
IList implementation?

Please note that the plase where I am looking for this implementation is
from the Visula Studio metadata information page. The page that shows up
when you right-click on the "List<T>" word and then click on the "Go To
Definition" menu item.

This has to be something very stupid of my part, what am I missing?

May 15 '06 #3

P: n/a
Looks like the object browser in Visual Studio hides explicit interface
implementations. You could use Lutz Roeder's .NET Reflector instead,
see <http://www.aisto.com/roeder/dotnet/>.

May 15 '06 #4

P: n/a
Ah! Thanks, I thought I was going crazy!

"Johan Appelgren" <jo*************@gmail.com> wrote in message
news:11**********************@j55g2000cwa.googlegr oups.com...
Looks like the object browser in Visual Studio hides explicit interface
implementations. You could use Lutz Roeder's .NET Reflector instead,
see <http://www.aisto.com/roeder/dotnet/>.

May 15 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.