Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft C# .NET
Curious about syntax
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Peter Duniho, post: 13885695"] I think the comments for the code are pretty clear. The first GetEnumerator() method implements IEnumerable<T>. The second implements IEnumerable. Note that the method names are _not_ the same. The first is simply "GetEnumerator". The second is "System.Collections.IEnumerable.GetEnumerator". The latter is the syntax for declaring an interface implementation explicitly. Such implementations can be used _only_ by casting the variable to the interface type; they aren't available in the declaring type itself. Pete [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft C# .NET
Curious about syntax
Top