static void Main()
        {
            var myclass1 = new MyClass1();
            var x = (IMyInterface)myclass1; // Noncompliant
            x = myclass1 as IMyInterface; // Noncompliant
            bool b = myclass1 is IMyInterface; // Noncompliant

            var arr = new MyClass1[10];
            var arr2 = (IMyInterface[])arr;

            var myclass2 = new MyClass2();
            var y = (IMyInterface)myclass2;

            IMyInterface i = new MyClass3();
            var c = (IMyInterface2)i; // Compliant
            IMyInterface4 ii = null;
            var c = (IMyInterface2)i; // Compliant
            var d = (IMyInterface3)i;

            var o = (object)true;
            d = (IMyInterface3)o;

            var coll = (IEnumerable<int>)new List<int>();

            var z = (IDisposable)new MyClass4();

            var w = (IDisposable)(new Node());
        }
        static void Main()
        {
            var myclass1 = new MyClass1();
            var x = (IMyInterface)myclass1; // Noncompliant
//                   ^^^^^^^^^^^^
            x = myclass1 as IMyInterface; // Noncompliant
//                          ^^^^^^^^^^^^
            bool b = myclass1 is IMyInterface; // Noncompliant {{Review this cast; in this project there's no type that extends "MyClass1" and implements "IMyInterface".}}

            var arr = new MyClass1[10];
            var arr2 = (IMyInterface[])arr;

            var myclass2 = new MyClass2();
            var y = (IMyInterface)myclass2;

            IMyInterface i = new MyClass3();
            var c = (IMyInterface2)i; // Compliant
            IMyInterface4 ii = null;
            var c = (IMyInterface2)i; // Compliant
            var d = (IMyInterface3)i;

            var o = (object)true;
            d = (IMyInterface3)o;

            var coll = (IEnumerable<int>)new List<int>();

            var z = (IDisposable)new MyClass4();

            var w = (IDisposable)(new Node());
        }
        static void Main(IMyInterface x, IMyInterface y)
        {
            var b = x == y; // Noncompliant {{Consider using 'Equals' if value comparison was intended.}}

//                    ^^
            b = x != y;                         // Noncompliant
            b = x != null;
            b = x == new object();              // Noncompliant
            b = new Base() == new object();     // Noncompliant
            b = new MyClass() == new object();  // Noncompliant
            b = new MyClass2() == new object(); // CS0253
            b = new object() == new object();

            // The following is compliant
            // mscorlib defines Type.operator==, but System.Runtime doesn't, and System.Type defines Equals,
            // which performs reference equals.
            // We can't test it here though, because in the test we have the mscorlib's Type
            b = typeof(object) == typeof(object);

            var dependencyObject = new System.Windows.Data.CollectionViewSource();

            b = dependencyObject == dependencyObject;
        }