Skip to content

Commit 27ffa56

Browse files
committed
Added comment on yield keyword.
1 parent db4b1bc commit 27ffa56

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/lectures/data/CList_as_ICollection.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ In addition to signaling that our class realizes the interface, using `public cl
3434
```{download="./code/projects/CList_ICollection.zip"}
3535
!include`snippetStart="/* Done with Cell.*/", snippetEnd="/* We are done realizing the ICollection class. */"` code/projects/CList_ICollection/CList_ICollection/CList.cs
3636
```
37+
38+
The technical role of the [`yield` keyword](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/yield) is not really important: the main thing to understand is that we are constructing a way for C# to iterate over elements in our custom list in the `GetEnumerator` method.

0 commit comments

Comments
 (0)