﻿<?xml version="1.0" encoding="utf-8"?><Type Name="PreferStringComparisonOverrideRule" FullName="Gendarme.Rules.Globalization.PreferStringComparisonOverrideRule"><TypeSignature Language="C#" Value="public class PreferStringComparisonOverrideRule : Gendarme.Rules.Globalization.PreferOverrideBaseRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit PreferStringComparisonOverrideRule extends Gendarme.Rules.Globalization.PreferOverrideBaseRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Globalization</AssemblyName><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>Gendarme.Rules.Globalization.PreferOverrideBaseRule</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>Gendarme.Framework.FxCopCompatibility("Microsoft.Globalization", "CA1307:SpecifyStringComparison")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Problem("A call is made to a method for which an override, accepting an extra StringComparison, is available")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Specify how the string should be compared by adding the right StringComparison value to the call")</AttributeName></Attribute></Attributes><Docs><summary>
            This rule detects calls to method that could be changed to call an <c>override</c> accepting an
            extra <c>System.StringComparison</c> parameter. Using the <c>override</c> makes the code easier
            to maintain since it makes the intent clear on how the string needs to be compared.
            It is even more important since the default string comparison rules have changed between
            .NET 2.0 and .NET 4.0.
            </summary><remarks>To be added.</remarks><example>
            Bad example:
            <code>
            public bool Check (string name)
            {
            	// it's not clear if the string comparison should be culture sensitive or not
            	return (String.Compare (name, "Software") == 0);
            }
            </code></example><example>
            Good example:
            <code>
            public bool Check (string name)
            {
            	return (String.Compare (name, "Software", StringComparison.CurrentCulture) == 0);
            }
            </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public PreferStringComparisonOverrideRule ();" /><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="IsPrefered"><MemberSignature Language="C#" Value="protected override bool IsPrefered (Mono.Cecil.TypeReference type);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance bool IsPrefered(class Mono.Cecil.TypeReference type) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="type" Type="Mono.Cecil.TypeReference" /></Parameters><Docs><param name="type">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member><Member MemberName="Report"><MemberSignature Language="C#" Value="protected override void Report (Mono.Cecil.MethodDefinition method, Mono.Cecil.Cil.Instruction instruction, Mono.Cecil.MethodReference prefered);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Report(class Mono.Cecil.MethodDefinition method, class Mono.Cecil.Cil.Instruction instruction, class Mono.Cecil.MethodReference prefered) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="method" Type="Mono.Cecil.MethodDefinition" /><Parameter Name="instruction" Type="Mono.Cecil.Cil.Instruction" /><Parameter Name="prefered" Type="Mono.Cecil.MethodReference" /></Parameters><Docs><param name="method">To be added.</param><param name="instruction">To be added.</param><param name="prefered">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member></Members></Type>