Reflector.Snippy Addin updated (v0.9.3.0)

by Jason Haley 30. January 2009 19:22

I'm currently reading Bill Wagner's book: More Effective C#: 50 Specific Ways to Improve Your C# (Effective Software Development Series)  - which is turning out to be a great book to follow Jon Skeet's book (C# in Depth: What you need to master C# 2 and 3) ... so I've found myself using the Reflector.Snippy addin more and more and wanting to run some of the sample code to see the output (like I mentioned last week in the Reflector Addin: CopyPath and VS Command Prompt Here entry).  In that entry I wrote: "... a nice addition to the Reflector.Snippy addin would be an execute button if it is set to compile as an executable ... I'll let you know if I make this change anytime soon" - well this week I added the change to Reflector.Snippy.

Addin Download Link: Reflector.Snippy.zip or Reflector.Snippy.dll

image

The current version of the Reflector.Snippy addin is 0.9.3.0 (previous was 0.9.2.0).

The new version now includes a Start/Run command which is available only when the temp assembly is set to the output type of Executable (see the Reflector.Snippy Addin entry for more detail).

The Snippy sub menu from the Tools menu now looks like the image to the left.

There is also a Start/Run image on the tool bar of the Snippy window - which is enabled/disabled depending on the output type (must be set to executable to be enabled).

So if type up some sample code (or copy paste) into the Snippy window and click the start button (or Ctrl+F5), the addin will attempt to build the source code.  If the build succeeds, then a console window is opened and the temp assembly is run. 

For the example code in the screen shot (some test code on IEnumerable<T>), the console window pops up with the results as shown at the bottom of this page.

 

image

Output of the sample code after clicking the Start button:

 image

Using Reflector.Snippy you can now: open up a sample from Jon Skeet's book (or type up some sample code), build it, see the output the code sample creates AND look at the compiler created code in Reflector!   I think this little addition will make it easier for me and others to really dig into the newer features of C# and not only learn how to use the features of the language but better understand what the compiler is doing for us.

Comments (0) | Post RSSRSS comment feed |

Categories:
Tags:

Comments are closed