diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs index 1dd51c1052206..e129b5284bcb2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs @@ -26,7 +26,7 @@ public Latin1Encoding() : base(ISO_8859_1) public override ReadOnlySpan Preamble => default; // Default fallback that we'll use. - internal override void SetDefaultFallbacks() + internal sealed override void SetDefaultFallbacks() { // We use best-fit mappings by default when encoding. encoderFallback = EncoderLatin1BestFitFallback.SingletonInstance; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs index 022c87f070feb..b9fd2ef55538d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs @@ -62,7 +62,7 @@ public UTF32Encoding(bool bigEndian, bool byteOrderMark, bool throwOnInvalidChar SetDefaultFallbacks(); } - internal override void SetDefaultFallbacks() + internal sealed override void SetDefaultFallbacks() { // For UTF-X encodings, we use a replacement fallback with an empty string if (_isThrowException)