Skip to content

Commit

Permalink
Remove the obsolete serialization constructor for exceptions
Browse files Browse the repository at this point in the history
Fixes the `warning SYSLIB0051: 'COMException.COMException(SerializationInfo, StreamingContext)' is obsolete`
https://aka.ms/dotnet-warnings/SYSLIB0051
  • Loading branch information
jozefizso committed Jun 20, 2024
1 parent 442fd46 commit e79534a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Source/NetOffice/Exceptions/NetOfficeCOMException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,5 @@ public NetOfficeCOMException(string message, Exception inner) : base(message, in
public NetOfficeCOMException(string message, int errorCode) : base(message, errorCode)
{
}

/// <summary>
/// Creates an instance of the class
/// </summary>
/// <param name="info">the SerializationInfo object that holds the serialized object data</param>
/// <param name="context">the StreamingContext object that supplies the contextual information about the source or destination</param>
/// <exception cref="ArgumentNullException">info is null</exception>
[SecuritySafeCritical]
public NetOfficeCOMException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}

0 comments on commit e79534a

Please sign in to comment.