Sample code on Github does not match the tutorial code
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 268
Description
I am trying to follow the tutorial and wanted to peek at the finished code to make sure I put the IEnumerable Suits() in the right place. It was unclear to me if it should be inside the public class Program or not. But when I went to the sample code, I found it does not look at all like the tutorial. Instead of the IEnumerable type, I see enum types used.
Sample code location:
Code I expected to see:
```csharp
static IEnumerable Suits()
{
yield return "clubs";
yield return "diamonds";
yield return "hearts";
yield return "spades";
}
```
Code I found in the sample source code Github repository (`Program.cs`):
```csharp
public enum Suit
{
Clubs,
Diamonds,
Hearts,
Spades
}
```
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 5a2b7453-076c-a18e-f999-cbd57ab13e60
* Version Independent ID: b687ed5b-5013-cceb-01e5-77f9cc7bb534
* Content: [Working with LINQ](https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/working-with-linq)
* Content Source: [docs/csharp/tutorials/working-with-linq.md](https://github.com/dotnet/docs/blob/main/docs/csharp/tutorials/working-with-linq.md)
* Product: **dotnet-csharp**
* Technology: **csharp-linq**
* GitHub Login: @BillWagner
* Microsoft Alias: **wiwagn**
---
[Associated WorkItem - 476422](https://dev.azure.com/msft-skilling/Content/_workitems/edit/476422)
Contributor guide
Assessment
This issue has not been assessed yet.