Skip to content

Enable C# 11, System.Span, and utilize UTF-8 literals - #1160

Closed
iamcarbon wants to merge 2 commits into
sshnet:developfrom
carbon:develop
Closed

Enable C# 11, System.Span, and utilize UTF-8 literals#1160
iamcarbon wants to merge 2 commits into
sshnet:developfrom
carbon:develop

Conversation

@iamcarbon

Copy link
Copy Markdown

This PR enables the use of C# 11 and support for Span within the library.

@iamcarbon

iamcarbon commented Aug 24, 2023

Copy link
Copy Markdown
Author

@drieseng Let me know your thoughts on enabling C# 11 and Span support within the library.

CC @Rob-Hague

@WojciechNagorski

Copy link
Copy Markdown
Collaborator

.NET Standard and .NET Framework do not support C# 11. I know that in this case, it works but it also allows to use of features that will never work on .NET Framework and .NET Standard.

TargetVersionC# language version default
.NET7.xC# 11
.NET6.xC# 10
.NET5.xC# 9.0
.NET Core3.xC# 8.0
.NET Core2.xC# 7.3
.NET Standard2.1C# 8.0
.NET Standard2.0C# 7.3
.NET Standard1.xC# 7.3
.NET FrameworkallC# 7.3

Table source

The proposed changes do not bring enough value to the project to offset the disadvantages. The Span can be also used without C# 11.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@iamcarbon@WojciechNagorski