Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 3.28 KB

backports.md

File metadata and controls

62 lines (37 loc) · 3.28 KB
uid
backports

Backports

Newer versions of .NET often introduce features that can be backported to earlier versions. NanoByte.Common simplifies this by embedding commonly used backports. Simply adding a reference to NanoByte.Common to a project targeting an older .NET version allows you to use these features.

Language features

LINQ was introduced in .NET Framework 3.5 and is backported to .NET Framework 2.0 (by embedding LinqBridge).

Nullable reference types, Ranges and Records were introduced in .NET (Core) and are backported to .NET Framework.

Required members were introduced in .NET 7.0 and are backported to .NET 6.0 and .NET Framework.

Collections

The following types were introduced in .NET Framework 4.0 and are backported to .NET Framework 2.0:

  • xref:System.Collections.Generic.HashSet`1
  • xref:System.Collections.Generic.SortedSet`1

Cancellation

The following types were introduced in .NET Framework 4.0 and are backported to .NET Framework 2.0:

Progress

The following types were introduced in .NET Framework 4.5 and are backported to .NET Framework 2.0 and 4.0:

Utils

The following types were introduced in .NET Framework 4.5 and are backported to .NET Framework 2.0 and 4.0:

The following CustomAttributeExtensions methods were introduced in .NET Framework 4.5 and are backported to .NET Framework 2.0 and 4.0:

  • .GetCustomAttribute<T>()
  • .GetCustomAttributes<T>()

Platform attributes

The following types were introduced in .NET 5.0 and are backported to .NET Framework:

The following types were introduced in .NET 6.0 and are backported to .NET Framework: