Breaking Change: Fix argument name in CompareInfo.IsPrefix (suffix -> prefix) #20501
Closed
1 of 22 tasks
Labels
breaking-change
Indicates a .NET Core breaking change
🏁 Release: .NET 5
Work items for the .NET 5 release
doc-idea
Indicates issues that are suggestions for new topics [org][type][category]
Fix argument name in CompareInfo.IsPrefix (suffix -> prefix)
This
CompareInfo.IsPrefix()
API was added in .NET 5.0 RC1, but there is a mistake in the argument name wheresuffix
was used instead ofprefix
. The implementation is correct, but the reference assembly was wrong. dotnet/runtime#41803 fixed the argument name. This fix will ship with .NET 5.0 RC2.Version introduced
.NET 5.0 RC2
Old behavior
The previous method signature was the following, with an argument named
suffix
.New behavior
The updated method signature is the following, with the argument renamed to
prefix
.Reason for change
This corrects a mistake in the argument name and will improve the API, avoiding confusion by users.
Recommended action
If the argument was being used as a named argument, update calling code to correct the argument name to match the renamed
prefix
name.Category
Affected APIs
CompareInfo.IsPrefix(ReadOnlySpan<char>, ReadOnlySpan<char>, CompareOptions, out int)
The affected overload was added in .NET 5.0 RC1 and was not yet present in documentation at the time of this breaking change in RC2.
Issue metadata
The text was updated successfully, but these errors were encountered: