Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/actions/setup-dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ runs:
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x

- name: Set up dependency caching for faster builds
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion Common.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<LangVersion>13.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project contains the source code for the book **Essential C#** by Mark Mich

## Requirements

- [.NET](https://www.microsoft.com/net/core) - This project is currently tested against .NET 8.0, 7.0, and 6.0.
- [.NET](https://www.microsoft.com/net/core) - This project is currently tested against .NET 9.0 and 8.0.
- [Visual Studio](https://visualstudio.microsoft.com/downloads/) - Already contains .NET Core to get up and running. Not to mention, it's a great IDE that makes it easy to get started.
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - While not required, a good tool to get used to, and easy way to download this code repository quickly. [GitKraken](https://gitkraken.cello.so/tl7bYaRLgzT) is a great GUI for using Git if you prefer not using the command line. Visual Studio and VSCode also have ever improving git tooling built in.

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.0",
"version": "9.0.0",
"rollForward": "latestFeature",
"allowPrerelease": true
}
Expand Down
19 changes: 16 additions & 3 deletions src/Chapter16.Tests/Listing16.15.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void SelectingAnonymousTypeFollowingGroupClause()
string expected = dotnetCoreVersion switch
{
// Version <= 5
string value when string.Compare(value, "6")<0 => """
string value when string.Compare(value, "6") < 0 => """
Aggregate, All, Any, Append, AsEnumerable, Average, Cast, Concat, Contains,
Count, DefaultIfEmpty, Distinct, ElementAt, ElementAtOrDefault, Empty,
Except, First, FirstOrDefault, GroupBy, GroupJoin, Intersect, Join, Last,
Expand All @@ -35,8 +35,8 @@ string value when value.StartsWith("6") => """
ThenByDescending, ToArray, ToDictionary, ToHashSet, ToList,
ToLookup, TryGetNonEnumeratedCount, Union, UnionBy, Where, Zip,
""",
// Version 7
_ => """
// Version 7-8
string value when Version.TryParse(value, out var v) && (v.Major is 7 or 8) => """
Aggregate, All, Any, Append, AsEnumerable, Average, Cast,
Chunk, Concat, Contains, Count, DefaultIfEmpty, Distinct, DistinctBy,
ElementAt, ElementAtOrDefault, Empty, Except, ExceptBy, First,
Expand All @@ -47,6 +47,19 @@ string value when value.StartsWith("6") => """
SingleOrDefault, Skip, SkipLast, SkipWhile, Sum, Take, TakeLast,
TakeWhile, ThenBy, ThenByDescending, ToArray, ToDictionary, ToHashSet,
ToList, ToLookup, TryGetNonEnumeratedCount, Union, UnionBy, Where, Zip,
""",
// Version 9
_ => """
Aggregate, AggregateBy, All, Any, Append, AsEnumerable, Average, Cast,
Chunk, Concat, Contains, Count, CountBy, DefaultIfEmpty, Distinct, DistinctBy,
ElementAt, ElementAtOrDefault, Empty, Except, ExceptBy, First,
FirstOrDefault, GroupBy, GroupJoin, Index, Intersect, IntersectBy, Join,
Last, LastOrDefault, LongCount, Max, MaxBy, Min, MinBy, OfType,
Order, OrderBy, OrderByDescending, OrderDescending, Prepend, Range,
Repeat, Reverse, Select, SelectMany, SequenceEqual, Single,
SingleOrDefault, Skip, SkipLast, SkipWhile, Sum, Take, TakeLast,
TakeWhile, ThenBy, ThenByDescending, ToArray, ToDictionary, ToHashSet,
ToList, ToLookup, TryGetNonEnumeratedCount, Union, UnionBy, Where, Zip,
"""
};

Expand Down
Loading