﻿<?xml version="1.0" encoding="utf-8"?><Type Name="ReviewCastOnIntegerMultiplicationRule" FullName="Gendarme.Rules.Correctness.ReviewCastOnIntegerMultiplicationRule"><TypeSignature Language="C#" Value="public class ReviewCastOnIntegerMultiplicationRule : Gendarme.Framework.Rule, Gendarme.Framework.IMethodRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ReviewCastOnIntegerMultiplicationRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IMethodRule, class Gendarme.Framework.IRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Correctness</AssemblyName><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>Gendarme.Framework.Rule</BaseTypeName></Base><Interfaces><Interface><InterfaceName>Gendarme.Framework.IMethodRule</InterfaceName></Interface></Interfaces><Attributes><Attribute><AttributeName>Gendarme.Framework.EngineDependency(typeof(Gendarme.Framework.Engines.OpCodeEngine))</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Problem("This method casts the result of an integer multiplication into a larger integer. This may result in an overflow before the cast can be done.")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Cast the operands instead of the result.")</AttributeName></Attribute></Attributes><Docs><summary>
            This rule checks for integral multiply operations where the result is cast to
            a larger integral type. It's safer instead to cast an operand to the larger type
            to minimize the chance of overflow.
            </summary><remarks>This rule is available since Gendarme 2.2</remarks><example>
            Bad example:
            <code>
            public long Bad (int a, int b)
            {
            	// e.g. Bad (Int32.MaxInt, Int32.MaxInt) == 1
            	return a * b;
            }
            </code></example><example>
            Good example:
            <code>
            public long Good (int a, int b)
            {
            	// e.g. Good (Int32.MaxInt, Int32.MaxInt) == 4611686014132420609
            	return (long) a * b;
            }
            </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public ReviewCastOnIntegerMultiplicationRule ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><Parameters /><Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member><Member MemberName="CheckMethod"><MemberSignature Language="C#" Value="public Gendarme.Framework.RuleResult CheckMethod (Mono.Cecil.MethodDefinition method);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype Gendarme.Framework.RuleResult CheckMethod(class Mono.Cecil.MethodDefinition method) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>Gendarme.Framework.RuleResult</ReturnType></ReturnValue><Parameters><Parameter Name="method" Type="Mono.Cecil.MethodDefinition" /></Parameters><Docs><param name="method">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member></Members></Type>