<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Matt Manela's Blog : MSDN Code Gallery</title><link>http://blogs.msdn.com/matt/archive/tags/MSDN+Code+Gallery/default.aspx</link><description>Tags: MSDN Code Gallery</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>I was on DotNetRocks!!!</title><link>http://blogs.msdn.com/matt/archive/2008/02/20/i-was-on-dotnetrocks.aspx</link><pubDate>Wed, 20 Feb 2008 22:32:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7822532</guid><dc:creator>MattManela</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/matt/comments/7822532.aspx</comments><wfw:commentRss>http://blogs.msdn.com/matt/commentrss.aspx?PostID=7822532</wfw:commentRss><description>&lt;p&gt;A couple week ago I had an interview with the &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=316"&gt;DotNetRocks&lt;/a&gt; folks.&amp;#160; In this interview I discussed the &lt;a href="http://code.msdn.com"&gt;MSDN Code Gallery&lt;/a&gt; and I also discuss ed my time as an intern at Microsoft.&amp;#160; &lt;/p&gt;  &lt;p&gt;It was really fun recording this and my interviewers Carl and Richard were very enjoyable to talk to.&lt;/p&gt;  &lt;p&gt;I hope you like it.&amp;#160; You can get to the interview by clicking &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=316"&gt;HERE!!!!&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7822532" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/matt/archive/tags/Funny/default.aspx">Funny</category><category domain="http://blogs.msdn.com/matt/archive/tags/Personal/default.aspx">Personal</category><category domain="http://blogs.msdn.com/matt/archive/tags/MSDN+Code+Gallery/default.aspx">MSDN Code Gallery</category></item><item><title>FastSharp - Write it, Execute it</title><link>http://blogs.msdn.com/matt/archive/2008/02/11/fastsharp-write-it-execute-it.aspx</link><pubDate>Tue, 12 Feb 2008 10:30:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7634526</guid><dc:creator>MattManela</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/matt/comments/7634526.aspx</comments><wfw:commentRss>http://blogs.msdn.com/matt/commentrss.aspx?PostID=7634526</wfw:commentRss><description>&lt;p&gt;Last year I wrote this program which I named FastSharp.&amp;nbsp; It is a text editor which lets you compile and run C# code that would normally exist inside a method.&amp;nbsp; 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.&amp;nbsp; &lt;/p&gt; &lt;p&gt;A prime example of this happened today (which is what sparked me to finally post this program).&amp;nbsp; My co-worker &lt;a href="http://blogs.msdn.com/bertan" target="_blank"&gt;Bertan&lt;/a&gt; and I were talking about the &lt;a title="DateTime Structure" href="http://msdn2.microsoft.com/03ybds8y.aspx"&gt;System.DateTime&lt;/a&gt; object in .NET.&amp;nbsp; We were wondering if the ToBinary() method would return the same value regardless&amp;nbsp; whether the datetime object was in local time or in UTC mode.&amp;nbsp; He was about to fire up Visual Studio and create a project just to write this two line program when I showed him FastSharp. &lt;/p&gt; &lt;p&gt;First I opened the program:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/FastSharpWriteitSeeitForgetaboutit_13688/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="353" alt="image" src="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/FastSharpWriteitSeeitForgetaboutit_13688/image_thumb.png" width="444" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Then I entered this two line program and hit the run button:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/FastSharpWriteitSeeitForgetaboutit_13688/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="353" alt="image" src="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/FastSharpWriteitSeeitForgetaboutit_13688/image_thumb_1.png" width="444" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I got an error because I forgot the capitalize the second t in ToUniversalTime().&amp;nbsp; So, I corrected that and then ran it again:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/FastSharpWriteitSeeitForgetaboutit_13688/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="353" alt="image" src="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/FastSharpWriteitSeeitForgetaboutit_13688/image_thumb_2.png" width="444" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And then we had our answer.&amp;nbsp; The to outputs are not the same so they do produce different results.&amp;nbsp; &lt;/p&gt; &lt;p&gt;The way FastSharp works is pretty simple.&amp;nbsp; 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).&amp;nbsp; It then compiles the code using the &lt;a title="CSharpCodeProvider Class" href="http://msdn2.microsoft.com/tteyf242.aspx"&gt;Microsoft.CSharp.CSharpCodeProvider&lt;/a&gt; class and executes it.&amp;nbsp; 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).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Things To Consider and Future Consideration&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;FastSharp can only do console output not input.&amp;nbsp; I was unable to figure out how to make Console.ReadLine() work inside the program.&amp;nbsp; This will be an important future feature if someone can figure it out.&lt;/li&gt; &lt;li&gt;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.&lt;/li&gt; &lt;li&gt;FastSharp uses the out-of-the-box winforms RichTextBox control as the code editor.&amp;nbsp; It would be nice to replace this with a code editor that color coded or even give intellisense :)&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Give Me! Give Me! Give Me!&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;To download both the FastSharp binary and source code visit &lt;a href="http://code.msdn.microsoft.com/matt/Wiki/View.aspx?title=FastSharp" target="_blank"&gt;FastSharp Code Gallery Page&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7634526" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/matt/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/matt/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/matt/archive/tags/Downloads/default.aspx">Downloads</category><category domain="http://blogs.msdn.com/matt/archive/tags/MSDN+Code+Gallery/default.aspx">MSDN Code Gallery</category></item><item><title>Introducing MSDN Code Gallery</title><link>http://blogs.msdn.com/matt/archive/2008/01/28/introducing-msdn-code-gallery.aspx</link><pubDate>Tue, 29 Jan 2008 09:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7299781</guid><dc:creator>MattManela</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/matt/comments/7299781.aspx</comments><wfw:commentRss>http://blogs.msdn.com/matt/commentrss.aspx?PostID=7299781</wfw:commentRss><description>&lt;P&gt;Today, the new site &lt;A href="http://code.msdn.com" mce_href="http://code.msdn.com" target="_blank"&gt;MSDN Code Gallery&lt;/A&gt; has launched.  This is the best place to find and share samples, tools and articles about development and programming.  Code Gallery is already being used by many teams here at Microsoft to post cool tools and samples to help you be more productive in your coding.  But the site's use doesn't stop there, it will let ANYONE who has a live id post samples and tools to share with the public.&lt;/P&gt;&lt;P&gt;The Code Gallery software is built from the &lt;A href="http://www.codeplex.com" mce_href="http://www.codeplex.com" target="_blank"&gt;Codeplex&lt;/A&gt; application.  This means you get a ton of feature likes, discussions, issue tracker and wiki pages to describe your content in detail.  All these features make Code Gallery a very attractive place to store and share content you create.  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;You may be wondering why should you post things to Code Gallery rather than your blog.  This is a good question and in fact we were asked this question from many Microsoft employees as well.  The benefits are that it is more visible to search engines and it is easier for people to find your content since they have a one stop shop to go to.&lt;/P&gt;&lt;P&gt;I think this is pretty cool and I look forward to posting programs I work on to it soon.&lt;/P&gt;&lt;P&gt;&lt;A href="http://code.msdn.com" mce_href="http://code.msdn.com"&gt;&lt;IMG STYLE='border-right-color: #000000; border-right-width: 0px; border-right-style: none; border-top-color: #000000; border-top-width: 0px; border-top-style: none; border-left-color: #000000; border-left-width: 0px; border-left-style: none; border-bottom-color: #000000; border-bottom-width: 0px; border-bottom-style: none' height="328" alt="MSDN Code Gallery" src="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/IntroducingMSDNCodeGallery_10C35/image_3.png" mce_src="http://blogs.msdn.com/blogfiles/matt/WindowsLiveWriter/IntroducingMSDNCodeGallery_10C35/image_3.png" width="447" border="0"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7299781" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/matt/archive/tags/MSDN+Code+Gallery/default.aspx">MSDN Code Gallery</category></item></channel></rss>