diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs index 5c4c319d883aca..fa0f9c0b28ced9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs @@ -6,7 +6,7 @@ namespace System.Runtime.InteropServices { - public struct ArrayWithOffset + public readonly struct ArrayWithOffset { private readonly object? m_array; private readonly int m_offset; diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index 5fcb17353156e9..c9b9178c33b3b6 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -98,10 +98,10 @@ public sealed partial class AllowReversePInvokeCallsAttribute : System.Attribute { public AllowReversePInvokeCallsAttribute() { } } - public partial struct ArrayWithOffset + public readonly partial struct ArrayWithOffset { - private object _dummy; - private int _dummyPrimitive; + private readonly object _dummy; + private readonly int _dummyPrimitive; public ArrayWithOffset(object? array, int offset) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public bool Equals(System.Runtime.InteropServices.ArrayWithOffset obj) { throw null; }