title: Using LINQ expressions in Visual Studio's Watch window
body: <p>I have a byte[] variable in program, e.g.:</p>
  
  <pre><code>byte[] myByteArray = new byte[] { 0xF0, 0x0F };
  </code></pre>
  
  <p>When debugging this program, I wanted to display the byte array content as individual hexadecimal values inside Visual Studio's Watch window.</p>
  
  <p>So I tried to use the following LINQ expression in the Watch Window, without success:</p>
  
  <pre><code>myByteArray.Select(value =&gt; value.ToString("X2")).ToArray()
  </code></pre>
  
  <p>Watch window's error message:</p>
  
  <blockquote>
    <p>error CS1061: 'byte[]' does not contain a definition for 'Select' and
    no extension method 'Select' accepting a first argument of type
    'byte[]' could be found (are you missing a using directive or an
    assembly reference?)</p>
  </blockquote>
  
  <p>Does anyone know if there is a way to use LINQ expressions in Visual Studio's Watch window without installing third-party extensions?</p>
  
  <p>I'm using VS2017 15.6.6 at this moment.</p>
  
  <p>Edit: A screenshot of this issue...</p>
  
  <p><a href="https://i.stack.imgur.com/80PEp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/80PEp.png" alt="enter image description here"></a></p>