diff options
-rw-r--r-- | src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.Fast.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.Fast.cs b/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.Fast.cs index 967459e4b7..01c98eeb0e 100644 --- a/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.Fast.cs +++ b/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.Fast.cs @@ -50,6 +50,7 @@ namespace System.Runtime.InteropServices /// <exception cref="System.ArgumentException"> /// Thrown when <typeparamref name="TFrom"/> or <typeparamref name="TTo"/> contains pointers. /// </exception> + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span<TTo> Cast<TFrom, TTo>(Span<TFrom> source) where TFrom : struct where TTo : struct @@ -75,6 +76,7 @@ namespace System.Runtime.InteropServices /// <exception cref="System.ArgumentException"> /// Thrown when <typeparamref name="TFrom"/> or <typeparamref name="TTo"/> contains pointers. /// </exception> + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan<TTo> Cast<TFrom, TTo>(ReadOnlySpan<TFrom> source) where TFrom : struct where TTo : struct |