Click here to Skip to main content
15,881,204 members
Home / Discussions / C#
   

C#

 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
endo funk30-Jan-22 14:22
endo funk30-Jan-22 14:22 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
jschell17-Feb-22 10:22
jschell17-Feb-22 10:22 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
endo funk17-Feb-22 14:22
endo funk17-Feb-22 14:22 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
jschell30-Jan-22 7:07
jschell30-Jan-22 7:07 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
jschell30-Jan-22 7:06
jschell30-Jan-22 7:06 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
endo funk30-Jan-22 14:21
endo funk30-Jan-22 14:21 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
jschell17-Feb-22 10:28
jschell17-Feb-22 10:28 
GeneralRe: How would you describe what an IEnumerable is to a bright student of C# Pin
endo funk17-Feb-22 14:38
endo funk17-Feb-22 14:38 
Pssst...
Let's review the opening paragraph's of the OP's post.

Quote:
Imagine you have bright young student sitting down with you, whom you've introduced to Linq, and generics ... and, they've had no problems mastering 'Select and 'Where, 'Aggregate, etc.

You have introduced them to the use of 'yield return' in a method to return an IEnumerable they can turn into an instance of a collection. They "get that," and get use of yield means they can skip direct assignment to a pre-defined, initialized collection, or, a collection instance reference passed in as an 'out parameter.

And you are trying to explain to them the "deferred iteration/evaluation" aspect of IEnumerable, and the way that enables some advanced practices (function chaining).

To make it a little easier to grasp for those too easily confused by many words, and / or a greater context than just one singled out by one bit of syntax, namely IEnumerable.

The questions were contextual... which apparently you missed completely. Why else would the second question be about deferred evaluation aka lazy evaluation, contextually similar the third question; the fourth question, fifth question, and finally the sixth question.

Contextually it would be rather silly to focus only on the very rudimentary interface definition of IEnumerable when none of the questions related to that... they all were if you missed it related to the behavior of extension methods of IEnumerable.

Ps. if you find the functional programming confusing just say so... as opposed to engaging in an awkward and rather pointless debate; where you clearly had missed the context that was put forward in the OP's post, and similarly the context implied by the questions.

modified 17-Feb-22 20:44pm.

QuestionC# filter database through comboboxes Pin
R-Berg21-Jan-22 1:20
R-Berg21-Jan-22 1:20 
AnswerRe: C# filter database through comboboxes Pin
jsc4221-Jan-22 3:50
professionaljsc4221-Jan-22 3:50 
GeneralRe: C# filter database through comboboxes Pin
R-Berg21-Jan-22 5:59
R-Berg21-Jan-22 5:59 
GeneralRe: C# filter database through comboboxes Pin
RobertSF22-Jan-22 8:15
professionalRobertSF22-Jan-22 8:15 
GeneralRe: C# filter database through comboboxes Pin
R-Berg24-Jan-22 1:37
R-Berg24-Jan-22 1:37 
GeneralRe: C# filter database through comboboxes Pin
RobertSF24-Jan-22 8:55
professionalRobertSF24-Jan-22 8:55 
GeneralRe: C# filter database through comboboxes Pin
R-Berg25-Jan-22 22:56
R-Berg25-Jan-22 22:56 
GeneralRe: C# filter database through comboboxes Pin
RobertSF26-Jan-22 10:18
professionalRobertSF26-Jan-22 10:18 
QuestionCalling new Process, path problems Pin
Member 1495533220-Jan-22 23:08
Member 1495533220-Jan-22 23:08 
AnswerRe: Calling new Process, path problems Pin
Richard MacCutchan20-Jan-22 23:41
mveRichard MacCutchan20-Jan-22 23:41 
AnswerRe: Calling new Process, path problems Pin
OriginalGriff20-Jan-22 23:48
mveOriginalGriff20-Jan-22 23:48 
QuestionPrinting two panels on a card back and front Pin
Member 1509338120-Jan-22 4:36
Member 1509338120-Jan-22 4:36 
AnswerRe: Printing two panels on a card back and front Pin
OriginalGriff20-Jan-22 5:12
mveOriginalGriff20-Jan-22 5:12 
GeneralRe: Printing two panels on a card back and front Pin
Member 1509338120-Jan-22 8:05
Member 1509338120-Jan-22 8:05 
GeneralRe: Printing two panels on a card back and front Pin
OriginalGriff20-Jan-22 8:12
mveOriginalGriff20-Jan-22 8:12 
GeneralRe: Printing two panels on a card back and front Pin
Luc Pattyn20-Jan-22 9:05
sitebuilderLuc Pattyn20-Jan-22 9:05 
GeneralRe: Printing two panels on a card back and front Pin
RobertSF20-Jan-22 11:09
professionalRobertSF20-Jan-22 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.