﻿<?xml version="1.0" encoding="utf-8"?><Type Name="PreferCharOverloadRule" FullName="Gendarme.Rules.Performance.PreferCharOverloadRule"><TypeSignature Language="C#" Value="public class PreferCharOverloadRule : Gendarme.Framework.Rule, Gendarme.Framework.IMethodRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit PreferCharOverloadRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IMethodRule, class Gendarme.Framework.IRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Performance</AssemblyName><AssemblyVersion>4.2.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 code is calling a string-based overload when a char-based overload could be used.")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Replace the string parameters with chararacter parameters.")</AttributeName></Attribute></Attributes><Docs><summary>
             This rule looks for calls to <c>String</c> methods that use <b>String</b>
             parameters when a <c>Char</c> parameter could have been used. Using the
             <c>Char</c> overload is preferred because it will be faster. 
            
             Note, however, that this may result in subtly different behavior on versions of
             .NET before 4.0: the string overloads do a culture based comparison using
             <c>CultureInfo.CurrentCulture</c> and the char methods do an ordinal
             comparison (a simple compare of the character values). This can result in
             a change of behavior (for example the two can produce different results when
             precomposed characters are used). If this is important it is best to use an
             overload that allows StringComparison or CultureInfo to be explicitly specified
             see [http://msdn.microsoft.com/en-us/library/ms973919.aspx#stringsinnet20_topic4] 
             for more details.
            
             With .NET 4.0 <c>String</c>'s behavior will change and the various methods
             will be made more consistent. In particular the comparison methods will be changed
             so that they all default to doing an ordinal comparison.
             </summary><remarks>This rule is available since Gendarme 2.4</remarks><example>
             Bad example:
             <code>
             if (s.IndexOf (":") == -1) {
            	Console.WriteLine ("no separator found");
             }
             </code></example><example>
             Good example:
             <code>
             if (s.IndexOf (':') == -1) {
            	Console.WriteLine ("no separator found");
             }
             </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public PreferCharOverloadRule ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>4.2.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>4.2.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>