public static int MainMethod(string[] ars) { TestStruct l = new TestStruct() { field = 8 } ; Base1 r = new Base1() { field = 2 } ; int flag = 0; dynamic d0 = l; try { d0 *= r; } catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException e) { if (ErrorVerifier.Verify(ErrorMessageId.NoImplicitConvCast, e.Message, "Base2", "TestStruct")) { flag++; } } dynamic d1 = l; try { d1 *= null; } catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException e) { if (ErrorVerifier.Verify(ErrorMessageId.NoImplicitConvCast, e.Message, "Base2", "TestStruct")) { flag++; } } dynamic d2 = l; dynamic d3 = r; try { d2 *= d3; } catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException e) { if (ErrorVerifier.Verify(ErrorMessageId.NoImplicitConvCast, e.Message, "Base2", "TestStruct")) { flag++; } } try { l *= d3; } catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException e) { if (ErrorVerifier.Verify(ErrorMessageId.NoImplicitConvCast, e.Message, "Base2", "TestStruct")) { flag++; } } if (flag == 0) return 0; return 1; }