public static void IsPatternErrorTest(IUnknown unknown) { if (unknown.QI <TestComObject>() is TestComObject testComObject) { } var isComObject = unknown.QI <TestComObject>() is TestComObject testComObject2 && testComObject2.ToString() == "blablabla"; }
public static void IsAsValidTest(IUnknown unknown) { var myComObjcet = unknown.QI <TestComObject>(); var myComObjcet2 = unknown.QIStrong <TestComObject>(); var isComObject = unknown.Is <TestComObject>(); }