“‘Exception.Exception(SerializationInfo, StreamingContext)’ is obsolete” — best practice for implementing exceptions?
I wrote an Exception
subclass in my C# project targeting .NET 8.0, and the template in the IDE automatically filled in the familiar serialization constructor (the one that takes SerializationInfo
and StreamingContext
), and the build now warns me: