Skip to content

Commit 71095e6

Browse files
author
dse
committed
Net40 compatibility fix.
1 parent 4c11f10 commit 71095e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/perf_utils/EncodingGetStringPolyfill.cs

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy