Example #1
0
        static void Main()
        {
            var comparer = new AwkwardInterface();

            // This should work
            comparer.Equals(null, null);
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
            comparer.GetHashCode(null);
        }
Example #2
0
        static void Main()
        {
            var comparer = new AwkwardInterface();

            // This should work
            comparer.Equals(null, null);
            // This should warn - it's going to throw
            comparer.GetHashCode(null);
        }