You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The StringExtensions.Replace methods can potentially conflict with native string methods in .NET 2.1. Specifically, the compiler seems to prefer Replace(String oldValue, String? newValue, StringComparison comparisonType) rather than the Replace(this string source, string oldValue, string newValue, int occurrences) extension when occurrences == 0.
This can be mitigated by renaming the Replace extensions to something more descriptive, like ReplaceOccurrences. It also doesn't really make sense that occurrences is allowed to be 0, as that is effectively a NoOp.
The text was updated successfully, but these errors were encountered:
The
StringExtensions.Replace
methods can potentially conflict with native string methods in .NET 2.1. Specifically, the compiler seems to preferReplace(String oldValue, String? newValue, StringComparison comparisonType)
rather than theReplace(this string source, string oldValue, string newValue, int occurrences)
extension whenoccurrences
== 0.This can be mitigated by renaming the
Replace
extensions to something more descriptive, likeReplaceOccurrences
. It also doesn't really make sense thatoccurrences
is allowed to be 0, as that is effectively a NoOp.The text was updated successfully, but these errors were encountered: