The DiffPlex (http://diffplex.codeplex.com) project is now available on Codeplex!
The DiffPlex project is a combination of a .NET Diffing Library with a Silverlight and HTML diff viewer. It is released open source under the MS-PL license.

The DiffPlex (http://diffplex.codeplex.com) project is now available on Codeplex!
The DiffPlex project is a combination of a .NET Diffing Library with a Silverlight and HTML diff viewer. It is released open source under the MS-PL license.

The DiffPlex (http://diffplex.codeplex.com) project is now available on Codeplex!
The DiffPlex project is a combination of a .NET Diffing Library with a Silverlight and HTML diff viewer. It is released open source under the MS-PL license.

Some History
The Snippet Designer was started as an intern project of mine during the Summer of 2006. The idea was to make snippet files (which were introduced to Visual Studio in 2005) a first class entity. Following this idea I created a Visual Studio plug-in which included an editor for snippet files and a search tool window to find snippets. The plan then was to release it on Codeplex but when my internship ended the project was forgotten about.
Today
Now after two year of sitting there I found the code, cleaned it up a bit and am releasing it on Codeplex as an open source project at http://www.codeplex.com/SnippetDesigner. My goal in releasing it on Codeplex is two fold. First I would like people to try it out, give me feedback and see if we can make it better (it still has plenty of rough edges). Second I would love to turn this into a community developed project where we all can collaborate on it.
Features
The Snippet Designer has two main features:
A Snippet Editor hosted in the IDE which lets you edit the code, make replacements and change snippet properties:
A Snippet Explorer which lets you search for Snippet files on your computer an quickly open and edit them.
In addition to these two features the plug-in adds a context menu item inside of the VB, C# and XML editor that lets you export any highlighted code into the snippet editor:
Getting Started
After installing the Snippet Designer you are ready to create and edit snippets. Either open up any .snippet file or in Visual Studio go to View -> Other Windows -> Snippet Explorer and use the Snippet Explorer to search for snippets.
I look forward to any and all feedback!
UPDATE: New version on FastSharp that includes a Windows 7 Gadget! Learn more here.
Last year I wrote this program which I named FastSharp. It is a text editor which lets you compile and run C# code that would normally exist inside a method. The inspiration for this came from getting tired of opening up Visual Studio and creating a project when all I want to do is execute one line of code and see what it outputs.
A prime example of this happened today (which is what sparked me to finally post this program). My co-worker Bertan and I were talking about the System.DateTime object in .NET. We were wondering if the ToBinary() method would return the same value regardless whether the datetime object was in local time or in UTC mode. He was about to fire up Visual Studio and create a project just to write this two line program when I showed him FastSharp.
First I opened the program:

Then I entered this two line program and hit the run button:

I got an error because I forgot the capitalize the second t in ToUniversalTime(). So, I corrected that and then ran it again:

And then we had our answer. The to outputs are not the same so they do produce different results.
The way FastSharp works is pretty simple. It takes whatever you enter and wraps it in a Main method which is then wrapped in a class which then has a list of import statements appended above it (configurable through the settings dialog). It then compiles the code using the Microsoft.CSharp.CSharpCodeProvider class and executes it. Because FastSharp wraps the code inside of a method block you can only write code that would normally compile inside of a method. (No classes or methods).
Things To Consider and Future Consideration
- FastSharp can only do console output not input. I was unable to figure out how to make Console.ReadLine() work inside the program. This will be an important future feature if someone can figure it out.
- FastSharp compiles only C# code but it is not hard to make it work for Visual Basic, which would also be a nice feature upgrade.
- FastSharp uses the out-of-the-box winforms RichTextBox control as the code editor. It would be nice to replace this with a code editor that color coded or even give intellisense
Give Me! Give Me! Give Me!
To download both the FastSharp binary and source code visit Click Here.