title: Use of is Keyword in C# to declare variable inline
body: <p>I am currently working on a C# project using v4.6.2 and Visual Studio just suggested a code change to the code below. </p>
  
  <p>My question is, I have never seen the <code>is</code> keyword used to create a new variable instance in this manner. </p>
  
  <p>The original code was:</p>
  
  <pre><code>var authInfo = inputs.FirstOrDefault(i =&gt;
      typeof(SoapAuthenticationBase).IsAssignableFrom(i.GetType()));
  
  if (authInfo is SoapAuthenticationBase)
  </code></pre>
  
  <p>Visual Studio 2017 suggested this:</p>
  
  <pre><code>if (inputs.FirstOrDefault(i =&gt;
          typeof(SoapAuthBase).IsAssignableFrom(i.GetType())) 
          is SoapAuthBase authenticationContract)
  </code></pre>
  
  <p>I checked Microsoft's documentation on the <a href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/is" rel="nofollow noreferrer">'is' keyword</a> and found nothing that explained this syntax. </p>
  
  <p>What version of C# was 'is' added in this way?</p>