Skip to content

Conversation

@jjonescz
Copy link
Member

I think it's useful to dogfood C# in this repo. This also allows us to use new C# features earlier in this repo.

#if NET10_0_OR_GREATER
public static IEnumerable<T> Reverse<T>(T[] array) => Enumerable.Reverse(array);
#else
public static IEnumerable<T> Reverse<T>(this T[] array) => Enumerable.Reverse(array);
Copy link
Member Author

@jjonescz jjonescz Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is needed to work around a C# breaking change on non-net10.0 TFMs.

(This would be needed anyway when C# 14 becomes the Latest version.)

@jjonescz jjonescz marked this pull request as ready for review April 28, 2025 16:59
@jjonescz
Copy link
Member Author

Not sure if I need more sign offs on this simple change. If anyone has concerns, let me know, we can always revert. Thanks.

@jjonescz jjonescz merged commit 00e076d into dotnet:main Apr 30, 2025
31 checks passed
@jjonescz jjonescz deleted the preview branch April 30, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants