title: LINQPad in Visual Studio
body: <pre><code>public static class Extensions{
  public static void Dump&lt;T&gt;(this T o) { }
  public static void Dump&lt;T&gt;(this T o, string s) { }}
  </code></pre>
  
  <p>These lines allow me to copy code from LINQPad to VS and run it without commenting out every line with .Dump() but it's not enough...
  <a href="http://code.google.com/p/linqpadvisualizer/" rel="noreferrer">http://code.google.com/p/linqpadvisualizer/</a> - not very comfortable :(</p>
  
  <p>The best result I get searching for LINQPad in VS is this <a href="http://linqpad.uservoice.com/forums/18302-linqpad-feature-suggestions/suggestions/447166-make-dump-extension-method-available-in-visual-s" rel="noreferrer">site</a> with code below by Pat Kujawa.</p>
  
  <pre><code>using System.Diagnostics;
  using System.IO;
  public static class Extensions
  {
  public static void Dump&lt;T&gt;(this T o)
  {
      string localUrl = Path.GetTempFileName() + ".html";
      using (var writer = LINQPad.Util.CreateXhtmlWriter(true))
      {
          writer.Write(o);
          File.WriteAllText(localUrl, writer.ToString());
      }
      Process.Start(localUrl);
  }
  }
  </code></pre>
  
  <p>but Error   1   The name 'LINQPad' does not exist in the current context</p>
  
  <p>I couldn't find any LINQPad.dll on the net</p>