Skip to content

Commit 06f4faa

Browse files
author
dse
committed
Net40 compatibility fix.
1 parent fc549e3 commit 06f4faa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/perf_utils/EncodingGetStringPolyfill.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public unsafe static string GetString(this Encoding encoding, byte* pstr, int si
3535
if (!PlatformGetStringMethodsDelegatesCache.TryGetValue(encoding, out getStringDelegate))
3636
{
3737
getStringDelegate =
38-
(EncodingGetStringUnsafeDelegate)PlatformGetStringMethodInfo.CreateDelegate(
39-
typeof(EncodingGetStringUnsafeDelegate), encoding);
38+
(EncodingGetStringUnsafeDelegate)Delegate.CreateDelegate(
39+
typeof(EncodingGetStringUnsafeDelegate), encoding, PlatformGetStringMethodInfo);
4040
PlatformGetStringMethodsDelegatesCache.Add(encoding, getStringDelegate);
4141
}
4242
return getStringDelegate(pstr, size);

0 commit comments

Comments
 (0)