Skip to content

Commit

Permalink
Disable String.Contains(string, StringComparison) in newer .NET
Browse files Browse the repository at this point in the history
  • Loading branch information
fealebenpae committed May 4, 2022
1 parent d9b7b02 commit ec5189b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Realm/Realm/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace Realms
[EditorBrowsable(EditorBrowsableState.Never)]
public static class StringExtensions
{
#if !NETCOREAPP2_1_OR_GREATER
/// <summary>
/// Returns a value indicating whether a specified substring occurs within this string.
/// </summary>
Expand All @@ -47,6 +48,7 @@ public static bool Contains(this string str, string value, StringComparison comp

return str.IndexOf(value, comparisonType) >= 0;
}
#endif

/// <summary>
/// Performs a 'like' comparison between the specified string and pattern.
Expand Down

0 comments on commit ec5189b

Please sign in to comment.