private void ReplaceIfWith(IfStatement theIf, BlockStatement statementBlock)
 {
     if (!this.CanReplaceIf(statementBlock))
     {
         throw new Exception("Invalid IsEvent construction");
     }
     V_0 = (statementBlock.get_Statements().get_Item(1) as ExpressionStatement).get_Expression() as DynamicMemberReferenceExpression;
     if (V_0 == null)
     {
         V_0 = ((statementBlock.get_Statements().get_Item(1) as ExpressionStatement).get_Expression() as BinaryExpression).get_Right() as DynamicMemberReferenceExpression;
     }
     if (V_0.get_MemberName() == null || !V_0.get_IsMethodInvocation() || V_0.get_IsGenericMethod() || V_0.get_InvocationArguments().get_Count() != 1)
     {
         throw new Exception("Invalid IsEvent construction");
     }
     V_1 = V_0.get_MemberName().IndexOf('\u005F');
     if (V_1 != 3 && V_1 != 6)
     {
         throw new Exception("Invalid IsEvent construction");
     }
     V_2 = new DynamicMemberReferenceExpression(V_0.get_Target(), V_0.get_MemberName().Substring(V_1 + 1), V_0.get_ExpressionType(), V_0.get_MappedInstructions());
     if (V_1 == 3)
     {
         stackVariable44 = 2;
     }
     else
     {
         stackVariable44 = 4;
     }
     stackVariable56 = new BinaryExpression(stackVariable44, V_2, V_0.get_InvocationArguments().get_Item(0), V_2.get_ExpressionType(), this.typeSystem, null, false);
     V_3             = (BlockStatement)theIf.get_Parent();
     V_4             = V_3.get_Statements().IndexOf(theIf);
     V_5             = new ExpressionStatement(stackVariable56);
     V_5.set_Parent(V_3);
     V_3.get_Statements().set_Item(V_4, V_5);
     if (statementBlock.get_Statements().get_Count() == 3)
     {
         V_3.AddStatementAt(V_4 + 1, statementBlock.get_Statements().get_Item(2).Clone());
     }
     return;
 }