Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6869501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:33:55+00:00 2026-05-27T03:33:55+00:00

3 questions : 1) why does the out put is taken from the NON

  • 0

3 questions :

1) why does the out put is taken from the NON generic function ?

2) why do I have to implement ALSO the NON generic function ?

3) What do I need to do if i want to see the Generic function output ( the int’s) ?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:33:56+00:00Added an answer on May 27, 2026 at 3:33 am
    1. The foreach keyword does not require the collection to implement IEnumerable at all; rather, it will call any defined GetEnumerator methods.

    2. IEnumerable<T> implements IEnumerable for compatibility reasons.

    3. You should implement IEnumerable.GetEnumerator() explicitly and have the normal method return IEnumerator<T>.

    If the class has a normal GetEnumerator() method (as opposed to an explicit interface implementation), the compiler will call it.
    The spec says:

    • Otherwise, determine whether the type X has an appropriate GetEnumerator method:
      • Perform member lookup on the type X with identifier GetEnumerator and no type arguments. If the member lookup does not produce a match,
        or it produces an ambiguity, or produces a match that is not a method
        group, check for an enumerable interface as described below. It is
        recommended that a warning be issued if member lookup produces
        anything except a method group or no match.
      • Perform overload resolution using the resulting method group and an empty argument list. If overload resolution results in no
        applicable methods, results in an ambiguity, or results in a single
        best method but that method is either static or not public, check for
        an enumerable interface as described below. It is recommended that a
        warning be issued if overload resolution produces anything except an
        unambiguous public instance method or no applicable methods.
      • […]
    • Otherwise, check for an enumerable interface:
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some questions about Perl's map function. Specifically: How does %hash = map
function now(){ return +new Date; } questions : what does the plus sign mean?
I have three easy questions. Does anybody use QuickTest Pro for automated testing? Any
I have a few questions about data synchronization. The architecture does not seem to
i just got some more questions while learning PHP, does php implement any built
I have a need to migrate game score table from (don't laugh please...) *.ini
2 questions: Does using MVC make it any easier to build 508/WAI compliant sites?
Questions : What does the kernel do if you stick a shell-script into the
There are other SO questions on speeding up jQuery Mobile for Android, but does
First look at this url: https://stackoverflow.com/questions/tagged/xoxoxo/ This directory does not exists but somehow stackoverflow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.