title: How to deal with Code Contracts warning CC1036 when using string.IsNullOrWhiteSpace?
body: <p>I have the following code contract:</p>
  
  <pre><code>public void F(string x)
  {
      Contract.Requires(!string.IsNullOrWhiteSpace(x));
  
      throw new NotImplementedException();
  }
  </code></pre>
  
  <p>When compiling, I get the following warning:</p>
  
  <blockquote>
    <p>warning CC1036: Detected call to method 'System.String.IsNullOrWhiteSpace(System.String)' without [Pure] in contracts of method [...]</p>
  </blockquote>
  
  <p>How to deal with it?</p>
  
  <p>What's odd, is that I'm also using <code>string.IsNullOrEmpty</code>, which isn't marked as <code>[Pure]</code> as well, in other contracts and the rewriter does not have a problem with that.</p>
  
  <p>My Contract Rewriter's Version is 1.9.10714.2.</p>
  
  <p>This is the relevant part from the implementation of <code>String</code> class I'm using (retrieved from metadata):</p>
  
  <pre><code>#region Assembly mscorlib.dll, v4.0.0.0
  // C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll
  #endregion
  
  using System.Collections;
  using System.Collections.Generic;
  using System.Globalization;
  using System.Reflection;
  using System.Runtime.ConstrainedExecution;
  using System.Runtime.InteropServices;
  using System.Security;
  using System.Text;
  
  namespace System
  {
      // Summary:
      //     Represents text as a series of Unicode characters.To browse the .NET Framework
      //     source code for this type, see the Reference Source.
      [Serializable]
      [ComVisible(true)]
      public sealed class String : IComparable, ICloneable, IConvertible, IEnumerable, IComparable&lt;string&gt;, IEnumerable&lt;char&gt;, IEquatable&lt;string&gt;
      {
  
      // [...]
  
          //
          // Summary:
          // [...]
          public static bool IsNullOrEmpty(string value);
          //
          // Summary:
          // [...]
          public static bool IsNullOrWhiteSpace(string value);
  </code></pre>
  
  <p>Why is the <code>[Pure]</code> attribute missing?</p>