Skip to content

Commit

Permalink
Deprecate serialization ctor for .NET8 onward (#4440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored May 9, 2023
1 parent ff2d340 commit 89412f7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ public class InvalidManagedNameException : Exception, ISerializable
{
public InvalidManagedNameException(string? message) : base(message) { }

#if NET8_0_OR_GREATER
[Obsolete("Serialization constructors are deprecated in .NET8+", DiagnosticId = "SYSLIB0051")]
#endif
protected InvalidManagedNameException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}

0 comments on commit 89412f7

Please sign in to comment.