<Type Name="ToStringShouldNotReturnNullRule" FullName="Gendarme.Rules.BadPractice.ToStringShouldNotReturnNullRule">
  <TypeSignature Language="C#" Value="public class ToStringShouldNotReturnNullRule : Gendarme.Rules.BadPractice.ReturnNullRule, Gendarme.Framework.ITypeRule" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ToStringShouldNotReturnNullRule extends Gendarme.Rules.BadPractice.ReturnNullRule implements class Gendarme.Framework.IRule, class Gendarme.Framework.ITypeRule" />
  <AssemblyInfo>
    <AssemblyName>Gendarme.Rules.BadPractice</AssemblyName>
    <AssemblyVersion>2.11.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Gendarme.Rules.BadPractice.ReturnNullRule</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>Gendarme.Framework.ITypeRule</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes>
    <Attribute>
      <AttributeName>Gendarme.Framework.Problem("This type contains a ToString() method that could return null.")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Solution("Return an appropriately descriptive string or an empty string instead of returning null.")</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>
            This rule checks for overridden <c>ToString()</c> methods which return <c>null</c>.
            An appropriately descriptive string, or <c>string.Empty</c>, should be returned
            instead in order to make the value more useful (especially in debugging).
            </summary>
    <remarks>Before Gendarme 2.4 this rule was named ToStringReturnsNull.</remarks>
    <example>
            Bad example:
            <code>
            public override string ToString ()
            {
            	return (count == 0) ? null : count.ToString ();
            }
            </code></example>
    <example>
            Good example:
            <code>
            public override string ToString ()
            {
            	return count.ToString ();
            }
            </code></example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ToStringShouldNotReturnNullRule ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="CheckType">
      <MemberSignature Language="C#" Value="public Gendarme.Framework.RuleResult CheckType (Mono.Cecil.TypeDefinition type);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype Gendarme.Framework.RuleResult CheckType(class Mono.Cecil.TypeDefinition type) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gendarme.Framework.RuleResult</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="type" Type="Mono.Cecil.TypeDefinition" />
      </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 ins);" />
      <MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Report(class Mono.Cecil.MethodDefinition method, class Mono.Cecil.Cil.Instruction ins) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="method" Type="Mono.Cecil.MethodDefinition" />
        <Parameter Name="ins" Type="Mono.Cecil.Cil.Instruction" />
      </Parameters>
      <Docs>
        <param name="method">To be added.</param>
        <param name="ins">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>
