using System;
using System.Reflection;
-using System.Runtime;
-using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Diagnostics;
using System.Reflection.Emit;
public static bool operator ==(MulticastDelegate d1, MulticastDelegate d2)
{
- if ((Object)d1 == null)
- return (Object)d2 == null;
+ if (ReferenceEquals(d1, d2))
+ {
+ return true;
+ }
- return d1.Equals(d2);
+ return d1 is null ? false : d1.Equals(d2);
}
public static bool operator !=(MulticastDelegate d1, MulticastDelegate d2)
{
- if ((Object)d1 == null)
- return (Object)d2 != null;
+ if (ReferenceEquals(d1, d2))
+ {
+ return false;
+ }
- return !d1.Equals(d2);
+ return d1 is null ? true : !d1.Equals(d2);
}
public override sealed int GetHashCode()