diff --git a/src/Foundation/NSUrlSessionHandler.cs b/src/Foundation/NSUrlSessionHandler.cs index 638211139a35..a2029e14a34d 100644 --- a/src/Foundation/NSUrlSessionHandler.cs +++ b/src/Foundation/NSUrlSessionHandler.cs @@ -651,7 +651,10 @@ public bool PreAuthenticate { [EditorBrowsable (EditorBrowsableState.Never)] public IWebProxy? Proxy { get => null; - set => throw new PlatformNotSupportedException (); + set { + if (value is not null) + throw new PlatformNotSupportedException (); + } } // There doesn't seem to be a trivial way to specify the protocols to accept (or not)