<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEIHR389eCp7ImA9WxJWE0o.&quot;"><id>tag:blogger.com,1999:blog-36357903</id><updated>2009-06-18T18:55:36.160-07:00</updated><title>Brig Lamoreaux</title><subtitle type="html">Ideas on .Net Development</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.framework-it.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.framework-it.net/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><geo:lat>33.190353</geo:lat><geo:long>-111.445665</geo:long><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by/2.0/" /><logo>http://creativecommons.org/images/public/somerights20.gif</logo><link rel="self" href="http://feeds.feedburner.com/BrigLamoreaux" type="application/atom+xml" /><entry gd:etag="W/&quot;C0IHQXo7cCp7ImA9WxJQEEg.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-2294392043001495733</id><published>2009-05-22T21:05:00.001-07:00</published><updated>2009-05-22T21:05:30.408-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-22T21:05:30.408-07:00</app:edited><title>Automating Quality Code with FXCop</title><content type="html">&lt;p&gt;&lt;a href="http://www.gotdotnet.com/Team/FxCop/" target="_blank"&gt;FXCop&lt;/a&gt; is a tool that can analyze .NET manage code for conformance to design guidelines and your own custom rules. I recently found a great document that explicitly outlines how to create you own custom rules from &lt;a href="http://www.binarycoder.net/fxcop/" target="_blank"&gt;Jason Kresowaty&lt;/a&gt;. Some possible custom rules I am considering include:&lt;/p&gt;  &lt;h3&gt;Security Rules&lt;/h3&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;SQL Injection &lt;/li&gt;      &lt;li&gt;Session Hijacking &lt;/li&gt;      &lt;li&gt;Cross Site Scripting &lt;/li&gt;      &lt;li&gt;Sensitive Data in Query String &lt;/li&gt;      &lt;li&gt;Sensitive Data in Form Fields &lt;/li&gt;      &lt;li&gt;Sensitive Data in ViewState&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;h3&gt;Performance Checks&lt;/h3&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;YSlow Suggestions &lt;/li&gt;      &lt;li&gt;Company Specific Rules &lt;/li&gt;      &lt;li&gt;Using Common Logging&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;And More&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-2294392043001495733?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/BrigLamoreaux?a=Nndb3DQOczQ:n1JrKthpqi0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/BrigLamoreaux?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/BrigLamoreaux?a=Nndb3DQOczQ:n1JrKthpqi0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/BrigLamoreaux?i=Nndb3DQOczQ:n1JrKthpqi0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/Nndb3DQOczQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/2294392043001495733/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=2294392043001495733" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/2294392043001495733?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/2294392043001495733?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/Nndb3DQOczQ/automating-quality-code-with-fxcop.html" title="Automating Quality Code with FXCop" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2009/05/automating-quality-code-with-fxcop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MBQnk5fyp7ImA9WxJQEEg.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-275939934347042941</id><published>2009-05-22T21:04:00.001-07:00</published><updated>2009-05-22T21:04:13.727-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-22T21:04:13.727-07:00</app:edited><title>Preventing Groupthink</title><content type="html">&lt;p&gt;I’ve been looking into the idea of &lt;a href="http://en.wikipedia.org/wiki/Groupthink#prevent" target="_blank"&gt;Groupthink&lt;/a&gt; and found a nice list on preventing it.&lt;/p&gt;  &lt;p&gt;From Wikipedia:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Leaders should assign each member the role of “critical evaluator”. This allows each member to freely air objections and doubts. &lt;/li&gt;    &lt;li&gt;Higher-ups should not express an opinion when assigning a task to a group. &lt;/li&gt;    &lt;li&gt;The organization should set up several independent groups, working on the same problem. &lt;/li&gt;    &lt;li&gt;All effective alternatives should be examined. &lt;/li&gt;    &lt;li&gt;Each member should discuss the group's ideas with trusted people outside of the group. &lt;/li&gt;    &lt;li&gt;The group should invite outside experts into meetings. Group members should be allowed to discuss with and question the outside experts. &lt;/li&gt;    &lt;li&gt;At least one group member should be assigned the role of &lt;a href="http://en.wikipedia.org/wiki/Devil%27s_advocate"&gt;Devil's advocate&lt;/a&gt;. This should be a different person for each meeting. &lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-275939934347042941?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/BrigLamoreaux?a=NonwrScu0xg:GeCV2ggZjlc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/BrigLamoreaux?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/BrigLamoreaux?a=NonwrScu0xg:GeCV2ggZjlc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/BrigLamoreaux?i=NonwrScu0xg:GeCV2ggZjlc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/NonwrScu0xg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/275939934347042941/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=275939934347042941" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/275939934347042941?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/275939934347042941?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/NonwrScu0xg/preventing-groupthink.html" title="Preventing Groupthink" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2009/05/preventing-groupthink.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUACQXkzfip7ImA9WxVQF0s.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-3474904753395130750</id><published>2009-02-03T19:42:00.002-07:00</published><updated>2009-02-04T09:09:20.786-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-04T09:09:20.786-07:00</app:edited><title>Json Serialization</title><content type="html">&lt;p&gt;I've been having fun trying to implement an idea I have. Part of the idea involves caching objects to &lt;a href="http://www.danga.com/memcached/" target="_blank"&gt;memcached&lt;/a&gt; in &lt;a href="http://json.org/" target="_blank"&gt;Json&lt;/a&gt; format. The idea being that the object saved to memcached wouldn't be bound to .Net specific methodology. &lt;/p&gt;  &lt;h2&gt;What's out There&lt;/h2&gt;  &lt;p&gt;At first I looked into creating a &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc188950.aspx" target="_blank"&gt;Custom Formatter&lt;/a&gt; that would serialize my object for me. That seemed like an overkill so I searched for a faster and prepackaged library. After poking around to see what Json serializers were on the market, I found &lt;a href="http://www.codeplex.com/Json" target="_blank"&gt;Json.NET&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;At first this looked like a possible solution. Then I ran the Test Scripts on the Project and found a PerformanceTests test. This test script had timings for three different types of serializers. So my options were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Roll my own with a &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc188950.aspx" target="_blank"&gt;Custom formatter&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeplex.com/Json" target="_blank"&gt;Json.NET&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx" target="_blank"&gt;JavaScriptSerializer&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx" target="_blank"&gt;DataContractJsonSerializer&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Performance&lt;/h2&gt;  &lt;p&gt;I changed the Json.Net Performance tests to serialize and deserialize 1000 times. The JavaScriptSerializer was the fastest during the tests.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Serializer&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;JsonNet&lt;/td&gt;        &lt;td valign="top" width="200"&gt;203 ms&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;JavaScriptSerializer&lt;/td&gt;        &lt;td valign="top" width="200"&gt;95 ms&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;DataContractJsonSerializer&lt;/td&gt;        &lt;td valign="top" width="200"&gt;842 ms&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h2&gt;Strangeness&lt;/h2&gt;  &lt;p&gt;One of the bad things I saw happen is how the DataContractJsonSerializer tried to serialize the private methods of the class. So I thought I would try to force it to use the properties of the class by not defining a backing variable.&lt;/p&gt;  &lt;p&gt;&lt;code&gt;public string Name { get; set; }&lt;/code&gt; &lt;/p&gt;  &lt;p&gt;What to my surprise when I saw the following in the Json output:&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&amp;quot;&amp;lt;Name&amp;gt;k__BackingField&amp;quot;:&amp;quot;Rick&amp;quot;&lt;/code&gt;&lt;/p&gt;  &lt;p&gt;Weird.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-3474904753395130750?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=enal1V9e"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=PxMfKYH4"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=PxMfKYH4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/U5kJgkTtDkE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/3474904753395130750/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=3474904753395130750" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/3474904753395130750?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/3474904753395130750?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/U5kJgkTtDkE/json-serialization.html" title="Json Serialization" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.framework-it.net/2009/02/json-serialization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QGRnc8eip7ImA9WxVQFU8.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-5023109894672011130</id><published>2009-02-01T13:48:00.001-07:00</published><updated>2009-02-01T13:48:47.972-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-01T13:48:47.972-07:00</app:edited><title>First Impressions of Google App Engine</title><content type="html">&lt;p&gt;So I thought I would try to see what &lt;a href="http://code.google.com/appengine/" target="_blank"&gt;Google App Engine&lt;/a&gt; is all about. My main goal is to learn python a little better and also try to get a better understanding of how to build applications that can&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Handle a lot of load &lt;/li&gt;    &lt;li&gt;Be distributed &lt;/li&gt;    &lt;li&gt;Have Standard Data access &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Installing&lt;/h2&gt;  &lt;p&gt;I'm a .Net developer on a Windows machine and really don't have a lot of Linux/Python experience. I know I'm not alone so I am going to track my experience using GAE to build my car maintenance application know as Motozio.&lt;/p&gt;  &lt;p&gt;I'm following the Google Getting started guide which is the following&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Download and install &lt;a href="http://www.python.org/download/releases/2.5.4/" target="_blank"&gt;Python 2.5&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Download and install &lt;a href="http://code.google.com/appengine/downloads.html" target="_blank"&gt;GAE&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Coding&lt;/h2&gt;  &lt;p&gt;Installation is a breeze. The two python files for the &lt;a href="http://code.google.com/appengine/docs/gettingstarted/helloworld.html" target="_blank"&gt;hello world&lt;/a&gt; program are pretty straight forward too.&lt;/p&gt;  &lt;p&gt;Trouble hit when I tried to test my application. I really didn't know how to call the script but I figured it out.&lt;/p&gt;  &lt;p&gt;My application folder structure looks like this&lt;/p&gt;  &lt;pre&gt;c:\dev\helloworld\&lt;br /&gt;c:\dev\helloworld\helloworld.py&lt;br /&gt;c:\dev\helloworld\app.yaml&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Running&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I had to open a command prompt and type: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;C:\dev&amp;gt;dev_appserver.py helloworld&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Notice that the path to google_appengine, where the dev_appserver.py script resides, is already in the system path. The script dev_appserver wants the path to the application. Which is the helloworld directory.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once I got that figure out. Bam! My helloworld was up and running at &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I'm always impressed with out of the box examples of hello world. I really liked the ruby on rails example. And I am just as impressed with App Engine so far. Of course it doesn't take much to impress me.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-5023109894672011130?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=VaaCMhtD"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=PgPv2vQv"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=PgPv2vQv" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/-h-FYHfPvQ8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/5023109894672011130/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=5023109894672011130" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5023109894672011130?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5023109894672011130?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/-h-FYHfPvQ8/first-impressions-of-google-app-engine.html" title="First Impressions of Google App Engine" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2009/02/first-impressions-of-google-app-engine.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcBQng7cCp7ImA9WxRbF0g.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-6534371568427457530</id><published>2008-12-08T09:59:00.005-07:00</published><updated>2008-12-08T10:07:33.608-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-08T10:07:33.608-07:00</app:edited><title>Typing is Fun</title><content type="html">&lt;p&gt;I've been reading about &lt;a href="http://www.codinghorror.com/blog/archives/001188.html"&gt;other developers&lt;/a&gt; taking &lt;a href="http://www.typeonline.co.uk/typingspeed.php"&gt;typing test&lt;/a&gt; to see where they are. I thought I would jump in the game and post my results. I fit within the &lt;a href="http://www.google.com/search?rlz=1C1GGLS_enUS291US303&amp;amp;aq=0&amp;amp;oq=Average+typing+s&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=average+typing+speed"&gt;average typing speed&lt;/a&gt; between 50-70 wpm. Nothing to brag about. Although I did get a perfect score. Yes!&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;img src="http://2.bp.blogspot.com/_io6q_2NOAVQ/ST1TpyZP4yI/AAAAAAAAAlI/pUAY1PLh7rc/s400/CropperCapture%5B130%5D.Png" style="cursor:pointer; cursor:hand;width: 400px; height: 63px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5277466315715502882" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-6534371568427457530?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=SSgdVR8d"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=stce2Lxv"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=stce2Lxv" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/Dp6AzkIGErY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/6534371568427457530/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=6534371568427457530" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6534371568427457530?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6534371568427457530?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/Dp6AzkIGErY/typing-is-fun.html" title="Typing is Fun" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_io6q_2NOAVQ/ST1TpyZP4yI/AAAAAAAAAlI/pUAY1PLh7rc/s72-c/CropperCapture%5B130%5D.Png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/12/typing-is-fun.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QMQn0ycCp7ImA9WxRXF08.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-4391093345591399395</id><published>2008-10-22T17:23:00.001-07:00</published><updated>2008-10-22T17:23:03.398-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-22T17:23:03.398-07:00</app:edited><title>AjaxWorld - Day 3</title><content type="html">&lt;p&gt;This last day started off being able to sleep in, but it quickly went downhill when the promised breakfast arrived 45min late. Nevertheless, I did glean a few bits of good information, and only had to walk out of a few sessions. I don't want to sound like a jerk, but some of the content of the sessions was more like an infomercial than a learning environment. Enough of my rant, on to the tidbits.&lt;/p&gt;  &lt;h2&gt;Social Networks as a Tool&lt;/h2&gt;  &lt;p&gt;We use social networks everyday to accomplish our jobs. How can we utilize the power of social networks in an computerized environment. Look at your job through the eyes of a social network. In other words, what pieces of information do individual's own.&lt;/p&gt;  &lt;p&gt;Social networks can help me as a software developer produce higher quality of code.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;How: Create tools that utilize the group. For instance, FxCop can produce a list of broken rules when it runs. These broken rules can be placed into a central repository. Then the entire group can access the rules and fix the code. The trick is to make it easy to select a rule, get the code, and make the fix. Bam. Almost like ants doing a little bit of work to get a big job done.&lt;/li&gt;    &lt;li&gt;Groups are nodes. Treat group on the graph just like a regular node. It will have its own resources and connections and events. Groups can be used to manage projects&lt;/li&gt;    &lt;li&gt;See Ning.&lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;JQuery - Modular Code&lt;/h2&gt;  &lt;p&gt;A few people got their feelings hurt when &lt;a href="http://www.yehudakatz.com/" target="_blank"&gt;Yehuda Katz&lt;/a&gt; changed his presentation from an introduction to JQuery to a more advanced talk on how to write modular code with JQuery. I enjoyed the talk albeit Yehuda rushed through the talk due to his 15 minute tardiness.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Use the Addon .listener, .intercept to bind events. &lt;/li&gt;    &lt;li&gt;Bind to a higher element than lots of lower elements&lt;/li&gt;    &lt;li&gt;Use Event Messaging&lt;/li&gt;    &lt;li&gt;Think in High Level Events. Instead of e.keycode == 38 do .trigger('uparrow_clicked')&lt;/li&gt;    &lt;li&gt;See LiveQuery. This allows you to bind events to all DIV even if they are not on the page yet. Useful for dynamic text via a widget&lt;/li&gt;    &lt;li&gt;See &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Become a good Presenter&lt;/h2&gt;  &lt;p&gt;Walking away from this conference it was easy to spot the great presenters from the lousy ones. Great presenters do the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Prepare quality Content&lt;/li&gt;    &lt;li&gt;Format a clean unique presentation&lt;/li&gt;    &lt;li&gt;Know the audience&lt;/li&gt;    &lt;li&gt;Don't repeat the exact same general information someone else already covered.&lt;/li&gt;    &lt;li&gt;Have quality content&lt;/li&gt;    &lt;li&gt;Don't be an infomercial&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The lousy presenters did basically the opposite&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Show no emotion&lt;/li&gt;    &lt;li&gt;Mumble&lt;/li&gt;    &lt;li&gt;Appear as though you just saw the content&lt;/li&gt;    &lt;li&gt;Put lots of text on each slide&lt;/li&gt;    &lt;li&gt;Have misleading presentation titles in attempts to lure unsuspecting attendees&lt;/li&gt;    &lt;li&gt;Have poor content&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;That's about it. I'm about to get on the plane and leave beautiful San Jose and look forward to putting to practice the real gems of the conference.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-4391093345591399395?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=mGeU9j7c"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=b6ibYiTd"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=b6ibYiTd" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/Zol8tZUey60" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/4391093345591399395/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=4391093345591399395" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/4391093345591399395?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/4391093345591399395?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/Zol8tZUey60/ajaxworld-day-3.html" title="AjaxWorld - Day 3" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/10/ajaxworld-day-3.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YHQHc7fCp7ImA9WxRXF0U.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-5646949746134845488</id><published>2008-10-22T12:23:00.002-07:00</published><updated>2008-10-23T11:05:31.904-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-23T11:05:31.904-07:00</app:edited><title>AjaxWorld - Day 2</title><content type="html">&lt;p&gt;Another day and a little more information. This day had a couple of outstanding presentations. The first was by Kevin Lynch the CTO of Adobe. What a great presenter. The other was &lt;a href="http://www.crockford.com/"&gt;Douglas Crockford's&lt;/a&gt; survey of JavaScript. &lt;/p&gt;  &lt;h2&gt;General Tips and Tricks&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.jslint.com/" target="_blank"&gt;JsLink&lt;/a&gt; to validate JavaScript&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developer.yahoo.com/yui/compressor/" target="_blank"&gt;Yui Compressor&lt;/a&gt; for css/JavaScript minification&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.openajax.org/index.php" target="_blank"&gt;OpenAjax&lt;/a&gt; gives ajax guidelines&lt;/p&gt;  &lt;p&gt;Use the # to maintain state within your app.&lt;/p&gt;  &lt;h2&gt;Push Data to the Cloud&lt;/h2&gt;  &lt;p&gt;Because users are starting to access the web through multiple devices, there is a need to modify your application to run in the different contexts. Kevin Lynch showed a music library application that accessed his person music through the computer, phone, and Wii.&lt;/p&gt;  &lt;h2&gt;Manage Large Data&lt;/h2&gt;  &lt;p&gt;Charles Kendrick had a lot of good ideas on how to sort and filter high volume dataset. The idea is similar to chunking data. When a sort needs to happen, push the sort back to the DB if the record count is larger than the client page limit.&lt;/p&gt;  &lt;h2&gt;Complete Server side Solutions&lt;/h2&gt;  &lt;p&gt;This section comprised three different sessions. These included Java Server Face, Google's GWT, and finally jMaki. The general idea is developers will use tools to create pages that can call back to the server. &lt;a href="http://www.nofluffjuststuff.com/conference/speaker/karthik_shyamsunder.html" target="_blank"&gt;Karthik Shyamsunder&lt;/a&gt; showed how GWT will actually compile down the Java into JavaScript and also merge all images into a single image. The script created is specific for the browser and version. &lt;/p&gt;  &lt;p&gt;One technique to do partial rendering of pages is to keep track of the DOM tree and perform a Diff between the two DOMs. Then send down the Diff file to have the client update the parts that need to be updated. Very clever.&lt;/p&gt;  &lt;p&gt;Use a publish subscribe bus on the client for inter-component communication. &lt;/p&gt;  &lt;h2&gt;JavaScript the Good Parts&lt;/h2&gt; This was by far the most informational session. &lt;a href="http://www.crockford.com/"&gt;Douglas Crockford&lt;/a&gt; presented the ideas found in his book &lt;a href="http://oreilly.com/catalog/9780596517748/" target="_blank"&gt;JavaScript: The Good Parts.&lt;/a&gt; In it, he showed how different he === and == operators are and how important it is to use the === all the time. He recommended using &lt;a href="http://www.jslint.com/" target="_blank"&gt;JsLint&lt;/a&gt; to verify your JavaScript to ensure you are following the best practices he found.  &lt;h2&gt;Variable User Experience&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://markmeeker.com/events/ajaxworld2008" target="_blank"&gt;Mark Meeker&lt;/a&gt; from Obitz showed how they created their application to down grade gracefully. They first develop the page to work with &lt;a href="http://en.wikipedia.org/wiki/Plain_Old_Semantic_HTML" target="_blank"&gt;POSH&lt;/a&gt;. Then depending on the user's browser, you can enhance the user experience by hiding detail with JavaScript and CSS. They also use build test to enforce their development standards. They make use of a composite view design. This is where you create many small controls that show specific data and have specific behavior. These controls are then assembled together onto a single page.&lt;/p&gt;  &lt;h2&gt;Next Steps&lt;/h2&gt;  &lt;p&gt;I think I would like to try writing an application in both GWT and Silverlight. I like the idea of being able to publish a single application have have it live on the network edge through a CDN. For now though, my apps will be widgets and JavaScript based.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-5646949746134845488?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=wSWEzXng"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=rihmye0D"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=rihmye0D" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/75LV8eTLHd0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/5646949746134845488/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=5646949746134845488" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5646949746134845488?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5646949746134845488?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/75LV8eTLHd0/ajaxworld-day-2.html" title="AjaxWorld - Day 2" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/10/ajaxworld-day-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIEQH09fyp7ImA9WxRXFUQ.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-8957192395451287937</id><published>2008-10-21T07:15:00.001-07:00</published><updated>2008-10-21T07:15:01.367-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-21T07:15:01.367-07:00</app:edited><title>AjaxWorld - Day 1</title><content type="html">&lt;p&gt;First day over and I think the overall assessment is not too bad. The sessions started pretty early at 7:30 and went all the way till 8:00pm. That's ok if all the sessions had been stellar, but I would say they were only ok. &lt;/p&gt; &lt;p&gt;The day started off with Scott Guthrie showing off some Silverlight and MVC. Some of the talk highlights were:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The more api's the better. As more companies and application standardize and expose api's, the easier it is to consume those data and create mashups. &lt;/li&gt; &lt;li&gt;Business's need to think about multiple channels of delivering content. Users access the web via browsers, TVs, gaming consoles, their phones, and soon much more.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The rest of the sessions seemed to all blend into one. I'll try to take better notes on day two, but this is what I captured for the rest of the day,. Right away Dave Meeker said don't reinvent the wheel for social networks. Use third party frameworks and tools. OK. Now on to the big ideas that stood out.&lt;/p&gt; &lt;h2&gt;Use 3D design&lt;/h2&gt; &lt;p&gt;This means the z dimension on the page and also changing the size of elements according to their relevance. The examples I can think of is the office tool bar and the ITunes Music slider control. The control where on the edge of the screen the images seemed to be filed and stacked close together, but the center image is large and full. The idea is to put the most important content front and center, and push the rest to the sides.&lt;/p&gt; &lt;h2&gt;Ajax Push / Comet.&lt;/h2&gt; &lt;p&gt;Where have I been? I was blown away by this idea of the server being able to update content on the client. &lt;a href="http://en.wikipedia.org/wiki/Reverse_Ajax" target="_blank"&gt;Ajax Push&lt;/a&gt; makes a lot of sense if you have many clients that are sharing a common resource that can change frequently. Ideas are, collaborative documents,&amp;nbsp; messaging, and alerts.&lt;/p&gt; &lt;h2&gt;Open Ajax&lt;/h2&gt; &lt;p&gt;I was really excited about &lt;a href="http://www.openajax.org/" target="_blank"&gt;Open Ajax Alliance&lt;/a&gt;. This is a group that is attempting to create some standards around Ajax. The ideas that stood out to me were the OpenAjax Metadata Specification. This document goes about defining the term Widgets and Ajax api's. This is a great idea because now toolkits can be created that can read the information. Enterprise should focus on SOA widget end services. Most excitedly is they have a preview tool for widgets, although I forgot where. Widgets become valuable when they can talk to one another. I'm just not entirely sure how they do this.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-8957192395451287937?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=sxJ3SWE4"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=VOiBb8YB"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=VOiBb8YB" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/czPoI0zQ_Mw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/8957192395451287937/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=8957192395451287937" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/8957192395451287937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/8957192395451287937?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/czPoI0zQ_Mw/ajaxworld-day-1.html" title="AjaxWorld - Day 1" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/10/ajaxworld-day-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIHQXsyfSp7ImA9WxdXE04.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-5350152974922240061</id><published>2008-06-24T11:35:00.001-07:00</published><updated>2008-06-24T11:35:30.595-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-24T11:35:30.595-07:00</app:edited><title>Use Fiddler with .Net Application</title><content type="html">&lt;p&gt;I often need to watch communication between a web service and my application. The best way I've found is to configure my app to use Fiddler as a proxy between my application and the web service. Once configured, I can watch the traffic. The simple step that I keep forgetting is the entry in the Web.Config file. &lt;/p&gt; &lt;h1&gt;Get Fiddler Settings&lt;/h1&gt; &lt;p&gt;Open Fiddler and click on Tools -&amp;gt; Fiddler Options. The Fiddler Options window will pop up and take note of Listen Port number under Proxy Settings. In this case the value is 8888.&lt;/p&gt; &lt;p&gt;&lt;a href="http://picasaweb.google.com/blamoreaux/BloggerPictures/photo?authkey=xF0ivtt8GuU#5215503748989006434"&gt;&lt;img src="http://lh5.ggpht.com/blamoreaux/SGExBts1MmI/AAAAAAAAAXQ/48SWucn18xs/s400/CropperCapture%5B71%5D.jpg"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h1&gt;Update Web.Config&lt;/h1&gt; &lt;p&gt;Open your Web.Config file and add the entry. Make sure the port on the address matches the one defined in Fiddler.&lt;/p&gt; &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt; &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.net&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;defaultProxy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;proxy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: red"&gt;proxyaddress&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://127.0.0.1:8888&lt;/span&gt;"&lt;span style="color: blue"&gt; /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;defaultProxy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.net&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Other web refrenced talk about setting other attributes on the proxy element, but don't These seem to make it fail. Just the simple solution from &lt;a href="http://www.west-wind.com/WebLog/posts/277966.aspx" target="_blank"&gt;Rick Strahl&lt;/a&gt; will make it work.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-5350152974922240061?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=cxoO1x1d"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=yNdtcIP3"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=yNdtcIP3" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/hPG97BTM0FU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/5350152974922240061/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=5350152974922240061" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5350152974922240061?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5350152974922240061?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/hPG97BTM0FU/use-fiddler-with-net-application.html" title="Use Fiddler with .Net Application" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/blamoreaux/SGExBts1MmI/AAAAAAAAAXQ/48SWucn18xs/s72-c/CropperCapture%5B71%5D.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/06/use-fiddler-with-net-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04CQn8ycSp7ImA9WxZbGEw.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-922049350333950809</id><published>2008-04-21T14:06:00.001-07:00</published><updated>2008-04-21T14:06:03.199-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-21T14:06:03.199-07:00</app:edited><title>Logging Best Practices</title><content type="html">&lt;p&gt;I just read a presentation from &lt;a href="http://www.certconf.org/presentations/2005/files/WC4.pdf" target="_blank"&gt;Network Intelligence&lt;/a&gt; on putting together a &lt;a href="http://www.acronymfinder.com/af-query.asp?Acronym=siem" target="_blank"&gt;SIEM&lt;/a&gt; solution. I really don't know that much about SIEM, but what I do know is when my application breaks, I want to know what happened and have access to the logs as quickly and easily as possible. &lt;/p&gt;  &lt;p&gt;I've talked about &lt;a href="http://blog.framework-it.net/2007/07/how-to-implement-logging.html" target="_blank"&gt;how to implement Logging&lt;/a&gt; in an application before, but this presentation sparked a few thoughts.&lt;/p&gt;  &lt;h2&gt;Don't Filter Logs at the Source &lt;/h2&gt;  &lt;p&gt;Log all events to a single place, then use a different tool to pull down the data to sort and filter.&lt;/p&gt;  &lt;h2&gt;Have a Reporting Time Period &lt;/h2&gt;  &lt;p&gt;Create a report that will run once a Day, once a week or whenever that shows all the events you are interested in seeing. After the report has ran, you can get rid of the data -or- you can archive it.&lt;/p&gt;  &lt;h2&gt;Standardized Time&lt;/h2&gt;  &lt;p&gt;Use a centralized, standard Time for every log. Synchronizing time between application logs will help correlate issues between applications. &lt;/p&gt;  &lt;h2&gt;Protect Sensitive Data&lt;/h2&gt;  &lt;p&gt;Be cautious of Sensitive information captured in the logs. Often username, machine names, and other sensitive data is captured in the event log. Provide access to the log to only those who need it.&lt;/p&gt;  &lt;h2&gt;Analyze Data&lt;/h2&gt;  &lt;p&gt;Every application should know what events will be logged during day to day usage. Create a baseline report and look for exceptions to the expected baseline.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-922049350333950809?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=xnCQcILm"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=mPLaWF3e"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=mPLaWF3e" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/KCcsm0bQ6ac" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/922049350333950809/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=922049350333950809" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/922049350333950809?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/922049350333950809?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/KCcsm0bQ6ac/logging-best-practices.html" title="Logging Best Practices" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/04/logging-best-practices.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QCRX08fCp7ImA9WxZVF0w.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-6869784962861776351</id><published>2008-03-28T08:49:00.001-07:00</published><updated>2008-03-28T08:49:24.374-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-28T08:49:24.374-07:00</app:edited><title>Practical SVN Branching and Merging</title><content type="html">&lt;p&gt;I love SVN and the ability to branch and tag my repository. I work on a two week release cycle with each revision being a version change. In SVN, I create a branch when I go into QA. Just about once a month I need to make a fix in QA which requires the need to merge a the branch fix into the trunk. Here are the steps I use in order to make that happen.  &lt;p&gt;&amp;nbsp; &lt;p&gt;Steps to update Trunk with Branch changes  &lt;ol&gt; &lt;li&gt;Finish and commit changes on branch.  &lt;li&gt;Point working copy to trunk via Switch  &lt;li&gt;Ensure working copy has latest changes via update  &lt;li&gt;Merge changes of Branch in to Working Copy via Merge Command.  &lt;ol&gt; &lt;li&gt;Click Merge  &lt;li&gt;Start URL will be the Branch  &lt;li&gt;Click Show Log to select the start of the branch  &lt;li&gt;End URL will also be the Branch  &lt;li&gt;Click the HEAD Revision. This will get all the changes made during the branch.  &lt;li&gt;Take Note of the Start and End Revisions. These values will be used later. You will have to log at the log to see what the head revision is.  &lt;li&gt;Click Dry Run to see what files will be affected.  &lt;li&gt;If things looks good, click Merge.&lt;br&gt;&lt;a href="http://picasaweb.google.com/blamoreaux/BlogImages/photo#5182819163297460514"&gt;&lt;img src="http://lh5.google.com/blamoreaux/R-0SkbtusSI/AAAAAAAAAVc/ZjHmCXeR1hE/s400/SVNMerge.Png.png"&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Your working copy now has the changes made during the branch. Edit conflicts if any.  &lt;li&gt;Commit you changes with the comment like: "Merged v2.0-branch changes r99026:99343 into the trunk"&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;I hope this helps, if not, I know it will help me because I keep forgetting how to do this. Let me know if you have a different approach of merging in patches. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-6869784962861776351?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=s6xpAGDT"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=4N2vyukO"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=4N2vyukO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/DiD9_FSNNvc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/6869784962861776351/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=6869784962861776351" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6869784962861776351?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6869784962861776351?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/DiD9_FSNNvc/practical-svn-branching-and-merging.html" title="Practical SVN Branching and Merging" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/03/practical-svn-branching-and-merging.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMDRXs-fSp7ImA9WxVSGUs.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-5930066651103283028</id><published>2008-03-27T11:37:00.005-07:00</published><updated>2009-01-14T14:27:54.555-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-14T14:27:54.555-07:00</app:edited><title>Fiddler and Web Requests</title><content type="html">I often need the ability to watch the web traffic that goes on between webservice calls and web request my application makes. One way I've found is to use &lt;a href="http://www.fiddlertool.com/"&gt;Fiddler &lt;/a&gt;to watch the traffic. The one important step I keep forgetting is how to tell my app to use the proxy. Here is the setting I need to make in the Config file. With this setting and &lt;a href="http://www.fiddlertool.com/"&gt;Fiddler&lt;/a&gt;, I can now watch all the web traffic my application makes.&lt;br /&gt;&lt;br /&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;defaultProxy enabled="true"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;proxy proxyaddress="http://127.0.0.1:8888/"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/proxy&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/defaultProxy&amp;gt;&lt;br /&gt;&amp;lt;/system.net&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-5930066651103283028?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=61UniG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=kbsd3zPH"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=kbsd3zPH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/sHR16KBJj1Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/5930066651103283028/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=5930066651103283028" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5930066651103283028?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5930066651103283028?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/sHR16KBJj1Y/fiddler-and-web-requests.html" title="Fiddler and Web Requests" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2008/03/fiddler-and-web-requests.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QAQX84fip7ImA9WB9WEEo.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-4666985118814325141</id><published>2007-11-14T15:29:00.001-07:00</published><updated>2007-11-14T15:29:00.136-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-14T15:29:00.136-07:00</app:edited><title>ASP.NET Authorization - Out of the Loop</title><content type="html">&lt;h2&gt;The Problem&lt;/h2&gt; &lt;p&gt;I have often created projects that have different areas restricted based on user roles. For instance, there might be a section only for administrator and another for power users then another for the general public. I needed a way to ensure users were restricted from accessing pages based on their roles. My solution worked and I thought it was pretty good, but I just realized there is a another way to do it.&lt;/p&gt; &lt;h2&gt;My Way&lt;/h2&gt; &lt;p&gt;I wanted to ensure that each page would perform a check to see if the current user was authorized to use the page. I created a base page which had an &lt;strong&gt;ApplyAuthorizationRules&lt;/strong&gt; method which was kicked off during &lt;strong&gt;OnInit&lt;/strong&gt;. By default I didn't do anything in the&amp;nbsp;method so&amp;nbsp;everyone was authorized to access the page by default.&lt;/p&gt; &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; BasePage : Page&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnInit(EventArgs e)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnInit(e);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        ApplyAuthorizationRules();&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ApplyAuthorizationRules()&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #008000"&gt;// By default do nothing. Essentially allow access to everyone.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Each page&amp;nbsp;that needed authorization would derive from the base class and override the &lt;strong&gt;ApplyAuthorizationRules&lt;/strong&gt; () method. Notice in the Class Diagram how the AdminPage is overriding the method while the other two pages, SummaryPage and DetailPage, use the default implementation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rzt2Lj814dI/AAAAAAAAAUI/QCcOwOkzCeQ/s1600-h/UrlAuthzUml.Png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5132826141319881170" style="cursor: hand" alt="" src="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rzt2Lj814dI/AAAAAAAAAUI/QCcOwOkzCeQ/s320/UrlAuthzUml.Png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The code in the AdminPage looks something like this:&lt;/p&gt;&lt;br /&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;br /&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AdminPage : BasePage&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ApplyAuthorizationRules()&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.User.IsInRole(Roles.Admin))&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            &lt;span style="color: #008000"&gt;// Allow&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;            Response.Redirect(&lt;span style="color: #006080"&gt;"~/Unauthorized.aspx"&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;This method worked great and could handle all of our use cases when we needed to apply authorization.&amp;nbsp;It worked so well I didn't dig any deeper into other solutions. To be honest I knew that ASP offered some tools for managing users and roles but I thought it was mostly tied to authentication.&amp;nbsp;What to my surprise today when I put two and two together and realized there is an ASP way to handle authorization.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;The ASP.NET Way&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Ever since my first ASP.NET application I have generally used the web.config file to configure authentication. I have generally used something like this:&lt;/p&gt;&lt;br /&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;br /&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;compilation&lt;/span&gt; &lt;span style="color: #ff0000"&gt;debug&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authentication&lt;/span&gt; &lt;span style="color: #ff0000"&gt;mode&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Forms"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;forms&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="myAppAtuh"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;loginUrl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/login.aspx"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authentication&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;deny&lt;/span&gt; &lt;span style="color: #ff0000"&gt;users&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="?"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;I never really took a close look at the &lt;a href="http://msdn2.microsoft.com/en-us/library/wce3kxhd.aspx" target="_blank"&gt;&amp;lt;authorization&amp;gt; tag&lt;/a&gt;. I can accomplish everything I was doing programmatically through configuration. With the following example, I'm able to create an Admin section on my app where only those users with an Admin role have access. There is a &lt;a href="http://msdn2.microsoft.com/en-us/library/b6x6shw7(VS.71).aspx" target="_blank"&gt;special case&lt;/a&gt; that allows users with a Role of 'Power' to see the /Admin/View.aspx page. You do have to be careful in creating the rules because they do execute in a top down manner.&lt;/p&gt;&lt;br /&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;br /&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;compilation&lt;/span&gt; &lt;span style="color: #ff0000"&gt;debug&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authentication&lt;/span&gt; &lt;span style="color: #ff0000"&gt;mode&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Forms"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;forms&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="myAppAtuh"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;loginUrl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/login.aspx"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authentication&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;deny&lt;/span&gt; &lt;span style="color: #ff0000"&gt;users&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="?"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;location&lt;/span&gt; &lt;span style="color: #ff0000"&gt;allowOverride&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;path&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/Admin/View.aspx"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt; &lt;span style="color: #ff0000"&gt;lockItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=""&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;allow&lt;/span&gt; &lt;span style="color: #ff0000"&gt;roles&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Power"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;location&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;location&lt;/span&gt; &lt;span style="color: #ff0000"&gt;allowOverride&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="false"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;path&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/Admin/"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt; &lt;span style="color: #ff0000"&gt;lockItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=""&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;allow&lt;/span&gt; &lt;span style="color: #ff0000"&gt;roles&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Admin"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;deny&lt;/span&gt; &lt;span style="color: #ff0000"&gt;users&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="*"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;location&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;My way isn't too bad. I do feel bad for not noticing that other people have talked about this before. Doing a &lt;a href="http://www.google.com/search?q=+Url+Authorization&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a" target="_blank"&gt;simple search&lt;/a&gt;&amp;nbsp;returns a lot of results showing everyone else already knew about the configuration method. Oh well, now I know, and you do too.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-4666985118814325141?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=r6Uq0KLP"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=Wd1HktiU"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=Wd1HktiU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/jTS0aZZb-A8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/4666985118814325141/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=4666985118814325141" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/4666985118814325141?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/4666985118814325141?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/jTS0aZZb-A8/aspnet-authorization-out-of-loop.html" title="ASP.NET Authorization - Out of the Loop" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rzt2Lj814dI/AAAAAAAAAUI/QCcOwOkzCeQ/s72-c/UrlAuthzUml.Png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/11/aspnet-authorization-out-of-loop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMCQn09fSp7ImA9WB9XEEk.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-293714910711620456</id><published>2007-11-02T16:01:00.001-07:00</published><updated>2007-11-02T16:01:03.365-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-02T16:01:03.365-07:00</app:edited><title>Beware Dynamic User Controls in a Web Farm</title><content type="html">&lt;p&gt;Many large sites utilize a web farm with a load balancer. The load balancer will cycle through each server in the farm for each request. Today I assumed our load balancer had &lt;a href="http://en.wikipedia.org/wiki/Load_balancing_%28computing%29" target="_blank"&gt;persistence&lt;/a&gt;. I think the text from Wikipedia sums my experience today: "But reliance on persistence can cause problems if the persistence fails." Come to find out, the rules on the load balancer were not setup uniformly and I found a special case where persistence failed.&lt;/p&gt; &lt;p&gt;My application was creating custom user controls dynamically on a form. The Page class offers two two ways to load a control dynamically:&lt;/p&gt; &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Control LoadControl(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; virtualPath);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Control LoadControl(Type t, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt;[] parameters);&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;My code was using the second method. It stuffed the control's GetType().AssemblyQualifiedName property into the view state. Then on the PostBack, this information was retrieved from the ViewState to create a Type object and Load the control again. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;One thing I didn't realize was the AssemblyQualifiedName used the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms404279.aspx" target="_blank"&gt;Shadow copy&lt;/a&gt;&amp;nbsp;assembly name, which is something like App_Web_XXXXXXXX where X can be any letter or number.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This would have been fine if persistence didn't fail on the load balancer. What happened however was the view state saved the type&amp;nbsp;assembly name as App_Web_ob44m7cy.dll, which it was on Server1, but because the load balancer directed the request to Server2, no such file existed. And that was the error I was getting.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;Type : System.IO.FileNotFoundException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;br&gt;Message : Could not load file or assembly 'App_Web_ob44m7cy, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.&lt;br&gt;Source : mscorlib&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The fix was two fold, tell the network team they didn't have uniform rules in place, shame shame shame. Second, don't rely on persistence being setup on the load balancer. I changed my code to load the control via the path. A pretty simple solution for a strange situation.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-293714910711620456?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=k2BNtO73"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=5sxK6SSJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=5sxK6SSJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/YPJPW465mQM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/293714910711620456/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=293714910711620456" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/293714910711620456?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/293714910711620456?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/YPJPW465mQM/beware-dynamic-user-controls-in-web.html" title="Beware Dynamic User Controls in a Web Farm" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/11/beware-dynamic-user-controls-in-web.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcNRXo9eCp7ImA9WB9QEUs.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-6197928527882108064</id><published>2007-10-23T10:21:00.001-07:00</published><updated>2007-10-23T10:21:34.460-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-23T10:21:34.460-07:00</app:edited><title>Getting Started with Lisp</title><content type="html">&lt;p&gt;Lisp is an old and powerful language that influences modern languages like C#. Lisp is also difficult to jump into. I'll outline where to go to download a compiler and the steps needed to start using Lisp today. &lt;/p&gt; &lt;p&gt;Lisp is known as the &lt;a href="http://www.paulgraham.com/quotes.html" target="_blank"&gt;programmable programming language&lt;/a&gt;. I became interested in Lisp when I learned how many of the sexy features in C#, like anonymous delegates,&amp;nbsp;were implemented in Lisp 20 years ago. I wanted to find out more about Lisp&amp;nbsp;but I didn't know where to start. The first step I found is to setup a Lisp environment.&lt;/p&gt; &lt;h4&gt;Download a Compiler&lt;/h4&gt; &lt;p&gt;Lisp has many different dialects. Common Lisp is one dialect. There are several different implementations of Common Lisp&amp;nbsp;similar to the different implementations of C++. The first step is to choose and download a specific Lisp compiler. I decided on Steel Bank Common Lisp (SBCL) for no rhyme or reason. One hurdle to overcome is understanding the unorthodox grid of available downloads. &lt;/p&gt; &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_io6q_2NOAVQ/Rx4szFx75NI/AAAAAAAAAIE/SacwRHZEXbg/s1600-h/SBCLOptions.Png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5124582682230777042" style="cursor: hand" alt="" src="http://4.bp.blogspot.com/_io6q_2NOAVQ/Rx4szFx75NI/AAAAAAAAAIE/SacwRHZEXbg/s320/SBCLOptions.Png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The secret to the grid is to look for&amp;nbsp;your OS in left column and&amp;nbsp;your processor in the top column. I was directed to the yellow square labeled 1.0.9. This&amp;nbsp;links to a installation&amp;nbsp;file called sbcl-1.0.9-x86-windows-binary.msi. Executing the installer will install some files to the in C:\Program Files\Steel Bank Common Lisp\1.0.9\ folder. The most important file is the sbcl.exe. I actually created a shortcut to this file and placed it in my C:\Documents and Settings\All Users\Start Menu\Programs\Lisp\ folder&lt;/p&gt; &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rx4szVx75OI/AAAAAAAAAIM/6uuP8MHAuSk/s1600-h/LispShortcut.Png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5124582686525744354" style="cursor: hand" alt="" src="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rx4szVx75OI/AAAAAAAAAIM/6uuP8MHAuSk/s320/LispShortcut.Png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h4&gt;Stand your Ground&lt;/h4&gt; &lt;p&gt;Running the sbcl.exe executable and firing up Lisp for the first time is a little daunting. You'll get a sappy message about a Kitten of Death and then just a * prompt, almost mocking you saying 'Here's your Lisp environment...now what are you going to do?"&lt;/p&gt; &lt;p&gt;Just shoot back with this and press enter:&lt;/p&gt; &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;(+ 2 3)&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Lisp will reply with:&lt;/p&gt;&lt;br /&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;br /&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;5&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Lisp is conquered. I now feel confident in taking the next step and actually studying the language to see what it can do. For this I highly recommend &lt;a href="http://www.gigamonkeys.com/book/" target="_blank"&gt;Practical Common Lisp&lt;/a&gt;. &lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Future Plans&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;I like the idea of being able to pass around functions and redefine them on the fly. I feel similar to &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=Lawrence+of+Arabia+It%27s+clean&amp;amp;btnG=Search" target="_blank"&gt;Lawrence&lt;/a&gt; and appreciate how clean the language is. It is void of a lot of keywords. I don't have any plans of writing an entire application in Lisp, but if I run into needing a small utility app, I will definitely consider using Lisp. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-6197928527882108064?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=LhidPhlK"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=U6N37QLA"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=U6N37QLA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/dDDx8a9j4II" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/6197928527882108064/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=6197928527882108064" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6197928527882108064?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6197928527882108064?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/dDDx8a9j4II/getting-started-with-lisp.html" title="Getting Started with Lisp" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_io6q_2NOAVQ/Rx4szFx75NI/AAAAAAAAAIE/SacwRHZEXbg/s72-c/SBCLOptions.Png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/10/getting-started-with-lisp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QMSX8_fip7ImA9WB5aFkQ.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-7414723060703705143</id><published>2007-08-31T12:21:00.001-07:00</published><updated>2007-09-13T07:56:28.146-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-13T07:56:28.146-07:00</app:edited><title>How to Convert Integers to Strings in C#</title><content type="html">&lt;p&gt;I've been working with converting strings to integers and have a few options at my disposal. In the past I've bounce between using Convert.Int32(string) and Int.Parse(string). I've decided to look into what really goes on under the covers between these different options.&lt;/p&gt;&lt;p&gt;There are three different ways to convert one item to another: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Implicit Conversion Operator&amp;nbsp; &lt;br /&gt;&lt;li&gt;Explicit Conversion Operator &lt;br /&gt;&lt;li&gt;Use a Format Provider &lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Conversion Operator&lt;/h3&gt;&lt;p&gt;In order for the implicit and explicit conversions to work, the class/structure must define a &lt;a href="http://msdn2.microsoft.com/en-us/library/09479473(VS.80).aspx" target="_blank"&gt;Conversion Operator&lt;/a&gt;. The&amp;nbsp;example below will&amp;nbsp;allow an explicit conversion from int to SampleClass. Notice how the method takes an int and&amp;nbsp;returns the SampleClass type:&lt;/p&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt; SampleClass&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;explicit&lt;/span&gt; &lt;span style="color: #0000ff"&gt;operator&lt;/span&gt; SampleClass(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i)&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        SampleClass temp = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SampleClass();&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #008000"&gt;// code to convert from int to SampleClass...&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; temp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Using the conversion in real code would then be:&lt;/p&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 45;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;SampleClass sc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SampleClass();&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;sc = (SampleClass)i; // Explicit conversion&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;If I had defined the method as implicit instead, then I wouldn't need the cast like operation. I could have just written:&lt;/p&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;br /&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;sc = i; // Implicit conversion&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;What I really wanted to know is how strings are converted into integers. The String class doesn't implement either an implicit or explicit conversion to int. This leaves me the option of having to use a Format Provider object.&lt;/p&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; String&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;explicit&lt;/span&gt; &lt;span style="color: #0000ff"&gt;operator&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;(String &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;) &lt;span style="color: #008000"&gt;// Doesn't exist.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;implicit&lt;/span&gt; &lt;span style="color: #0000ff"&gt;operator&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;(String &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;) &lt;span style="color: #008000"&gt;// Doesn't exist.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;Format Provider&lt;/h3&gt;&lt;p&gt;The framework offers two Format Provider methods:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Convert.ToInt32(string) &lt;br /&gt;&lt;li&gt;Int.parse(string) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The two are actually connected because Convert.ToInt32 calls Int.parse after it does a check for a null string.&lt;/p&gt;&lt;p&gt;Int.parse()&amp;nbsp;is the real worker because it dives deep into several methods and finally does all the work to convert text into different numbers.&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Int.parse(string) &lt;br /&gt;&lt;ul&gt;&lt;li&gt;calls Number.ParseInt32(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo) &lt;br /&gt;&lt;ul&gt;&lt;li&gt;calls Number.StringToNumber(s, style, ref buffer1, info, false) &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Calls Number.ParseNumber(ref chPtr2, options, ref number, info, parseDecimal) &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Does all the work here &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;p&gt;There are no implicit or explicit conversions from a string to an integer, you must use a format provider method. The two options available with the library are really one option. &lt;/p&gt;&lt;table cellspacing="0" cellpadding="2" width="519" border="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="204"&gt;&amp;nbsp;&lt;/td&gt;&lt;td valign="top" width="137"&gt;Is Null&lt;/td&gt;&lt;td valign="top" width="175"&gt;Is Not Number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="204"&gt;Convert.ToInt32(string)&lt;/td&gt;&lt;td valign="top" width="137"&gt;Return 0&lt;/td&gt;&lt;td valign="top" width="174"&gt;FormatException&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="204"&gt;Int.Parse(string)&lt;/td&gt;&lt;td valign="top" width="137"&gt;ArgumentNullException &lt;/td&gt;&lt;td valign="top" width="174"&gt;FormatException&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="204"&gt;Int.TryParse(string, out int)&lt;/td&gt;&lt;td valign="top" width="137"&gt;Return false&lt;/td&gt;&lt;td valign="top" width="174"&gt;Return false&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-7414723060703705143?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=Mqv7GvtA"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=DRp6JCiZ"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=DRp6JCiZ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/LrNmEA9qtOE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/7414723060703705143/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=7414723060703705143" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7414723060703705143?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7414723060703705143?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/LrNmEA9qtOE/how-to-convert-integers-to-strings-in-c.html" title="How to Convert Integers to Strings in C#" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/08/how-to-convert-integers-to-strings-in-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMNRXgycCp7ImA9WB5XGEo.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-981261977479580788</id><published>2007-07-19T12:31:00.001-07:00</published><updated>2007-07-19T12:31:34.698-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-19T12:31:34.698-07:00</app:edited><title>Review of Copy Source As Html Tools</title><content type="html">&lt;p&gt;It makes sense that as a blog about .net programming I should include samples of code. Code is easier to read when there is syntax highlighting and proper indentation. I'm going to look at four tools that provide&amp;nbsp;a way&amp;nbsp;of displaying source code in Html documents. The first tool is a general add in to Visual Studio and the last tools are specific to &lt;a href="http://windowslivewriter.spaces.live.com/Lists/cns!D85741BB5E0BE8AA!1340/" target="_blank"&gt;Windows Live Writer&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The contestants are the following:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/" target="_blank"&gt;CopySourceAsHtml&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=1f57bd9b-a692-4593-9e9e-e2962d9c0eee&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Insert Code for Windows Live Writer&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Paste from Visual Studio&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=d4409446-af7f-42ec-aa20-78aa5bac4748&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Code Snippet plugin for Windows Live Writer&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The plugins for Live Writer really are not named very well, but I'll give them a shot anyway.&lt;/p&gt; &lt;h4&gt;Screen Shot &lt;/h4&gt; &lt;p&gt;In order to do a fair test, I will be comparing how the different tools handle the code in this screen:&lt;/p&gt; &lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp-6BV_7OLI/AAAAAAAAAG0/3m9pTtOw9MI/s1600-h/CropperCapture%5B1%5D.jpg"&gt;&lt;img alt="" src="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp-6BV_7OLI/AAAAAAAAAG0/3m9pTtOw9MI/s400/CropperCapture%5B1%5D.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;h4&gt;CopySourceAsHtml&lt;/h4&gt; &lt;p&gt;This is an add-in for Visual Studio. Right clicking on the code to copy displays a Copy As Html... option in the context menu. Once clicked, an option box appears which provides additional configuration. I've used this tool in the past and have&amp;nbsp;always&amp;nbsp;been&amp;nbsp;satisfied with the results. I selected Wrap words and Embed styles as the only options for the copy which produce the following results: &lt;/p&gt; &lt;p&gt;&amp;lt;Example&amp;gt;&lt;/p&gt; &lt;p&gt;&lt;!--&lt;br /&gt;{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red128\green128\blue128;\red0\green128\blue0;\red43\green145\blue175;\red163\green21\blue21;}??\fs20 \cf1 using\cf0  System;\par ??\par ??\cf4 ///\cf5  \cf4 &amp;lt;summary&amp;gt;\par ??///\cf5  Wizard represents a humanoid with special abilities\par ??\cf4 ///\cf5  \cf4 &amp;lt;/summary&amp;gt;\par ??\cf1 public\cf0  \cf1 class\cf0  \cf6 Wizard\par ??\cf0 \{\par ??    \cf1 const\cf0  \cf1 string\cf0  Gretting = \cf7 "Greetings and well met."\cf0 ;\par ??\par ??    \cf4 ///\cf5  \cf4 &amp;lt;summary&amp;gt;\par ??\cf0     \cf4 ///\cf5  Says the greeting.\par ??\cf0     \cf4 ///\cf5  \cf4 &amp;lt;/summary&amp;gt;\par ??\cf0     \cf1 public\cf0  \cf1 void\cf0  SayGreeting()\par ??    \{\par ??        \cf5 // Ensure it is Daylight Saving Time\par ??\cf0         \cf1 if\cf0  (\cf6 DateTime\cf0 .Now.IsDaylightSavingTime())\par ??        \{\par ??            \cf6 Console\cf0 .Write(\cf6 Math\cf0 .Abs(\cf6 Math\cf0 .PI + 25.4));\par ??        \}\par ??        \cf1 else\par ??\cf0         \{\par ??            \cf6 Console\cf0 .Write(Gretting);\par ??        \}\par ??    \}\par ??\}}&lt;br /&gt;--&gt; &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt; System;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; Wizard represents a humanoid with special abilities&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;Wizard&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;{&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;const&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; Gretting = &lt;span style="color: #a31515"&gt;"Greetings and well met."&lt;/span&gt;;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; Says the greeting.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; SayGreeting()&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green"&gt;// Ensure it is Daylight Saving Time&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: #2b91af"&gt;DateTime&lt;/span&gt;.Now.IsDaylightSavingTime())&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.Write(&lt;span style="color: #2b91af"&gt;Math&lt;/span&gt;.Abs(&lt;span style="color: #2b91af"&gt;Math&lt;/span&gt;.PI + 25.4));&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;else&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.Write(Gretting);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;}&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;lt;/Example&amp;gt;&lt;/p&gt; &lt;p&gt;Embedding the styles&amp;nbsp;into the code gives the advantage of preserving the color highlighting when your post&amp;nbsp;is picked up by an aggregator. If you do not embed the styles then you will lose the formatting and the code appears as normal text. &lt;/p&gt; &lt;p&gt;The tools provides options that really allow you to produce exactly what you want. &lt;/p&gt; &lt;p&gt;The only bad thing is I am forced to switch to html mode in order to insert the code snippet.&lt;/p&gt; &lt;h4&gt;Insert Code for Windows Live Writer&lt;/h4&gt; &lt;p&gt;This is the first tool I've used as a plugin for Windows Live Writer. After the installation, I see a new option in my Insert list for Insert Code...&lt;/p&gt; &lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp-6BV_7OMI/AAAAAAAAAG8/WF0TldiuYmU/s1600-h/CropperCapture%5B2%5D.jpg"&gt;&lt;img alt="" src="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp-6BV_7OMI/AAAAAAAAAG8/WF0TldiuYmU/s400/CropperCapture%5B2%5D.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The web site for Insert Code describes it as able to format a snippet of text in a number of programming languages such as C#, HTML, MSH, JavaScript, Visual Basic and TSQL.&lt;/p&gt; &lt;p&gt;Here is the results of the insert:&lt;/p&gt; &lt;p&gt;&amp;lt;Example&amp;gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// Wizard represents a humanoid with special abilities&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Wizard&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Gretting = &lt;span class="str"&gt;"Greetings and well met."&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/// Says the greeting.&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SayGreeting()&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="rem"&gt;// Ensure it is Daylight Saving Time&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (DateTime.Now.IsDaylightSavingTime())&lt;br /&gt;        {&lt;br /&gt;            Console.Write(Math.Abs(Math.PI + 25.4));&lt;br /&gt;        }&lt;br /&gt;        &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            Console.Write(Gretting);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/Example&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Right away I can see that the color for strings is different that what I have defined in the original. More importantly I see I lost the specific font I had defined. The biggest advantage over CopySourceAsHtml is not forcing me to switch to html mode in order to insert the code. The plugin makes it completely transparent to me.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I think I'm going to run into trouble on some aggregators when it goes to process the code. Insert Code&amp;nbsp;creates a &amp;lt;style&amp;gt; &amp;lt;/style&amp;gt; section&amp;nbsp;where it defines the css classes used to format the code. The tool doesn't provide the option for me to select embedded styles nor does it give me options to tweak the output.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;One thing I do like is the ability to turn on alternate line background.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Paste from Visual Studio&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This is also an plugin for Windows Live Writer and also has nearly the same number of downloads as Insert Code. From the description on the web page, it&amp;nbsp;can easily transfer syntax highlighted source code from Visual Studio to elegant HTML in Windows Live Writer. Copy from Visual Studio and insert directly to Windows Live Writer to maintain your unique syntax highlighting settings.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;Example&amp;gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; Wizard represents a humanoid with special abilities&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Wizard&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;const&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt; Gretting = &lt;span style="color: rgb(163,21,21)"&gt;"Greetings and well met."&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; Says the greeting.&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; SayGreeting()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(0,128,0)"&gt;// Ensure it is Daylight Saving Time&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;DateTime&lt;/span&gt;.Now.IsDaylightSavingTime())&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.Write(&lt;span style="color: rgb(43,145,175)"&gt;Math&lt;/span&gt;.Abs(&lt;span style="color: rgb(43,145,175)"&gt;Math&lt;/span&gt;.PI + 25.4));&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;else&lt;br /&gt;&lt;/span&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.Write(Gretting);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/Example&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Sure enough, this tool has kept the colors and font I have defined in VS. The tool doesn't give me any type of user interface but takes the contents of the clipboard and inserts them as html. I'm guessing the tool&amp;nbsp;uses the&amp;nbsp;rich text formatting&amp;nbsp;that VS provides and builds the styles. I do like that the styles are embedded in the code so I won't lose any formatting in the aggregators. However, I miss having the opportunity to add any tweaks to the output before it is committed. &lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Insert Code Snippet&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The last Live Writer plugin to review is &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-8http://gallery.live.com/liveItemDetail.aspx?li=d4409446-af7f-42ec-aa20-78aa5bac4748&amp;amp;bt=9&amp;amp;pl=82eb-e1a006b083b9&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Code Snippet plugin for Windows Live Writer&lt;/a&gt;. This follows the same installation as the previous plugins. However, I do get the chance to make some changes before the code is inserted into my page.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_io6q_2NOAVQ/Rp-6Bl_7ONI/AAAAAAAAAHE/t108wFPGRkA/s1600-h/CropperCapture%5B3%5D.jpg"&gt;&lt;img alt="" src="http://3.bp.blogspot.com/_io6q_2NOAVQ/Rp-6Bl_7ONI/AAAAAAAAAHE/t108wFPGRkA/s400/CropperCapture%5B3%5D.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;I stick with the defaults and get the following results:&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;Example&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;&lt;br /&gt;&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// Wizard represents a humanoid with special abilities&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Wizard&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Gretting = &lt;span style="color: #006080"&gt;"Greetings and well met."&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;     &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;     &lt;span style="color: #008000"&gt;/// Says the greeting.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SayGreeting()&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;     {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;         &lt;span style="color: #008000"&gt;// Ensure it is Daylight Saving Time&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (DateTime.Now.IsDaylightSavingTime())&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;         {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;             Console.Write(Math.Abs(Math.PI + 25.4));&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;         }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;         {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt;             Console.Write(Gretting);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;         }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt;     }&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  25:&lt;/span&gt; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/Example&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Not too bad. In fact, besides not keeping my original color and font, I like the end result. I especially like how the styles are embedded inline. I don't think I would use the line numbers too often but I do like the alternate line background.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;The Results&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Among all of the tools I will keep two. I will keep CopyCodeAsHtml so I can get my code into html format whenever I want. For Windows Live Writer, I'm going to stick with the aptly named &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-8http://gallery.live.com/liveItemDetail.aspx?li=d4409446-af7f-42ec-aa20-78aa5bac4748&amp;amp;bt=9&amp;amp;pl=82eb-e1a006b083b9&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Code Snippet plugin for Windows Live Writer&lt;/a&gt;. I chose this as the winner because I am provided options over the results and it has inline styles. &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=1f57bd9b-a692-4593-9e9e-e2962d9c0eee&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Insert Code for Windows Live Writer&lt;/a&gt;&amp;nbsp;gives me almost the same features but doesn't provide inline styles which is a must when it comes to aggregators. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;I do wish that more languages were supported in the plugins and hope this will come in time. I know there must be more tools out there to get source code to html but these are the four that I found. If you have a tool that you enjoy, please share it. I'm always looking for ways to improve and make life easier.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-981261977479580788?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=uMbCugCG"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=l0udPGRP"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=l0udPGRP" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/s7QJPLGY6Sc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/981261977479580788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=981261977479580788" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/981261977479580788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/981261977479580788?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/s7QJPLGY6Sc/review-of-copy-source-as-html-tools.html" title="Review of Copy Source As Html Tools" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp-6BV_7OLI/AAAAAAAAAG0/3m9pTtOw9MI/s72-c/CropperCapture%5B1%5D.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/07/review-of-copy-source-as-html-tools.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcFSXg7fCp7ImA9WB5XF0Q.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-7590345342394777649</id><published>2007-07-18T15:33:00.001-07:00</published><updated>2007-07-18T15:33:38.604-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-18T15:33:38.604-07:00</app:edited><title>How to Implement logging</title><content type="html">&lt;p&gt;We are getting ready to send our&amp;nbsp;first child&amp;nbsp;off to kindergarten and I wish I could be a fly on the wall to see how he enjoys his first day&amp;nbsp;of school. Secretly I want to make sure he remembers the one-two punch I taught him in case someone tries to bully him around. Fortunately at work I have much more control over keeping track of&amp;nbsp;my applications once I send them into production. The secret is Logging.&lt;/p&gt; &lt;p&gt;Our team has&amp;nbsp;used three major logging implementations.&amp;nbsp;Log4Net, Enterprise Library, and a homegrown solution. What we have discovered is the importance of making the implementation transparent to our application.&lt;/p&gt; &lt;h4&gt;The Logging Wrapper&lt;/h4&gt; &lt;p&gt;The wrapper class minimizes the impact to your application when you switch out a logging implementation say from Log4Net to Enterprise Library Logging.&amp;nbsp;I have found the following interface to completely accommodate our needs. &lt;/p&gt; &lt;p&gt;&lt;!--&lt;br /&gt;{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red128\green128\blue128;\red255\green255\blue255;\red0\green128\blue0;\red0\green0\blue255;\red0\green0\blue0;\red43\green145\blue175;}??\fs20 \cf1 ///\cf3  \cf1 &amp;lt;summary&amp;gt;\par ??///\cf3  Represents an object that can log messages for the appliation. \par ??\cf1 ///\cf3  \cf1 &amp;lt;/summary&amp;gt;\par ??\cf4 public\cf0  \cf4 interface\cf0  \cf6 ILogger\par ??\cf0 \{\par ??    \cf1 ///\cf3  \cf1 &amp;lt;summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  Logs messages for informational purposes.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;para&amp;gt;\par ??\cf0     \cf1 ///\cf3  These messages will liberally used throughout the code to \par ??\cf0     \cf1 ///\cf3  provide process detailed information similar to traces.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/para&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;param name="message"&amp;gt;\cf3 The message to be logged.\cf1 &amp;lt;/param&amp;gt;\par ??\cf0     \cf4 public\cf0  \cf4 void\cf0  LogInformational(\cf4 string\cf0  message);\par ??    \cf1 ///\cf3  \cf1 &amp;lt;summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  Logs messages as a warning.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;para&amp;gt;\par ??\cf0     \cf1 ///\cf3  Warnigs are events from which the application can recover. \par ??\cf0     \cf1 ///\cf3  These can include messages like unable to save a record.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/para&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;param name="message"&amp;gt;\cf3 The message to be logged.\cf1 &amp;lt;/param&amp;gt;\par ??\cf0     \cf4 public\cf0  \cf4 void\cf0  LogWarning(\cf4 string\cf0  message);\par ??    \cf1 ///\cf3  \cf1 &amp;lt;summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  Logs an exception as a warning.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;para&amp;gt;\par ??\cf0     \cf1 ///\cf3  Warnigs are events from which the application can recover from. \par ??\cf0     \cf1 ///\cf3  These include all exception that are handled in a try catch block.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/para&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;param name="ex"&amp;gt;\cf3 The exception to be logged.\cf1 &amp;lt;/param&amp;gt;\par ??\cf0     \cf4 public\cf0  \cf4 void\cf0  LogWarning(\cf6 Exception\cf0  ex);\par ??    \cf1 ///\cf3  \cf1 &amp;lt;summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  Logs an exception as an error.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;para&amp;gt;\par ??\cf0     \cf1 ///\cf3  Errors are exceptions that are logged from the global error handler.\par ??\cf0     \cf1 ///\cf3  These are errors that the application did not expect.\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/para&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;/summary&amp;gt;\par ??\cf0     \cf1 ///\cf3  \cf1 &amp;lt;param name="ex"&amp;gt;\cf3 The exception to be logged.\cf1 &amp;lt;/param&amp;gt;\par ??\cf0     \cf4 public\cf0  \cf4 void\cf0  LogError(\cf6 Exception\cf0  ex);\par ??\}\par ??}&lt;br /&gt;--&gt; &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;interface&lt;/span&gt; &lt;span style="color: #2b91af"&gt;ILogger&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;{&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogInformational(&lt;span style="color: blue"&gt;string&lt;/span&gt; message);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogWarning(&lt;span style="color: blue"&gt;string&lt;/span&gt; message);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogWarning(&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; ex);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogError(&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; ex);&lt;/p&gt; &lt;p style="margin: 0px"&gt;}&lt;/p&gt;&lt;/div&gt; &lt;p&gt;I use three categories for the messages specifically so I can turn on and off logging by setting a threshold level.&lt;/p&gt; &lt;dl&gt; &lt;dt&gt;&lt;strong&gt;Informational&lt;/strong&gt;  &lt;dd&gt;These messages will be used liberally throughout the code to provide process detailed information similar to debug traces.  &lt;dt&gt;&lt;strong&gt;Warning&lt;/strong&gt;  &lt;dd&gt;Warnings are events the application can recover from. These include messages that provide more detail when the application responds to the user "Unable to save&amp;nbsp;record". Warnings also include all exceptions that are handled in a try catch block.  &lt;dt&gt;&lt;strong&gt;Errors&lt;/strong&gt;  &lt;dd&gt;Errors are exceptions that are logged from the global error handler.These are errors that the application did not expect.&lt;/dd&gt;&lt;/dl&gt; &lt;h4&gt;The Implementation&lt;/h4&gt; &lt;p&gt;We&amp;nbsp;use Enterprise Library for .NET Framework 1.1, June 2005 in our projects. We are still evaluating Enterprise Library 3.0 – April 2007 (for .NET Framework 2.0 and 3.0). In the meanwhile this is how I configured EntLib.&lt;/p&gt; &lt;p&gt;First I include the following dlls&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.Common  &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.Configuration  &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.ExceptionHandling  &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging  &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.Logging&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Then&amp;nbsp;I create a class that implements ILogger and use EntLib to get the job done.&lt;/p&gt; &lt;p&gt;&lt;!--&lt;br /&gt;{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red43\green145\blue175;\red163\green21\blue21;}??\fs20 \cf1 using\cf0  System;\par ??\cf1 using\cf0  Microsoft.Practices.EnterpriseLibrary.Logging;\par ??\cf1 using\cf0  Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;\par ??\cf1 namespace\cf0  App\par ??\{\par ??    \cf1 public\cf0  \cf1 class\cf0  \cf4 EntLib11Logger\cf0  : \cf4 ILogger\par ??\cf0     \{\par ??\par ??        \cf1 public\cf0  \cf1 void\cf0  LogInformation(\cf1 string\cf0  message)\par ??        \{\par ??           \cf4 Logger\cf0 .Write(message, \cf5 "Information"\cf0 , 1);\par ??        \}\par ??\par ??        \cf1 public\cf0  \cf1 void\cf0  LogWarning(\cf1 string\cf0  message)\par ??        \{\par ??            \cf4 Logger\cf0 .Write(message, \cf5 "Warning"\cf0 , 5, 1, \cf4 Severity\cf0 .Warning);\par ??        \}\par ??\par ??        \cf1 public\cf0  \cf1 void\cf0  LogWarning(\cf4 Exception\cf0  ex)\par ??        \{\par ??            \cf4 ExceptionPolicy\cf0 .HandleException(ex, \cf5 "Warning"\cf0 );\par ??        \}\par ??\par ??        \cf1 public\cf0  \cf1 void\cf0  LogError(\cf4 Exception\cf0  ex)\par ??        \{\par ??            \cf4 ExceptionPolicy\cf0 .HandleException(ex, \cf5 "Error"\cf0 );\par ??        \}\par ??\par ??    \}\par ??\}}&lt;br /&gt;--&gt; &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt; System;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.Logging;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;EntLib11Logger&lt;/span&gt; : &lt;span style="color: #2b91af"&gt;ILogger&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0px"&gt;{&lt;/p&gt; &lt;p style="margin: 0px"&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogInformation(&lt;span style="color: blue"&gt;string&lt;/span&gt; message)&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Logger&lt;/span&gt;.Write(message, &lt;span style="color: #a31515"&gt;"Information"&lt;/span&gt;, 1);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogWarning(&lt;span style="color: blue"&gt;string&lt;/span&gt; message)&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Logger&lt;/span&gt;.Write(message, &lt;span style="color: #a31515"&gt;"Warning"&lt;/span&gt;, 5, 1, &lt;span style="color: #2b91af"&gt;Severity&lt;/span&gt;.Warning);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogWarning(&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; ex)&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;ExceptionPolicy&lt;/span&gt;.HandleException(ex, &lt;span style="color: #a31515"&gt;"Warning"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; LogError(&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; ex)&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;ExceptionPolicy&lt;/span&gt;.HandleException(ex, &lt;span style="color: #a31515"&gt;"Error"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt; &lt;p style="margin: 0px"&gt;}&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Notice how both the Enterprise Library Logging and Exception Handling is used to provide functionality for our ILogger. With the Logging Block, I have to specify in the code the Priority level and Severity level. The Exception Handling Block allows those values to be set in the configuration file, which is what needs to be configure now.&lt;/p&gt; &lt;h4&gt;Configuration&lt;/h4&gt; &lt;p&gt;Configuration of Enterprise Library can be a little confusing but lets just go one section at a time.&lt;/p&gt; &lt;p&gt;The first thing we'll want to setup is the logging aspect. This makes the Exception Handling configuration a lot easier. Start up the EntLibConfig.exe tool and select File - Open Application and select the app.config file for the project.&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Logging Configuration&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Select your app node and choose to add the Logging and Instrumentation Application Block.&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6T1l_7OBI/AAAAAAAAAFg/QUWpVxfnReE/s1600-h/AddBlock.jpg"&gt;&lt;img alt="Add Block" src="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6T1l_7OBI/AAAAAAAAAFg/QUWpVxfnReE/s320/AddBlock.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The tool allows you to define categories, formatters, and sinks. Sinks are the final resting place for our messages. Sinks can be a flat file or an event log. Formatter are used to turn our message object into a plain text message. The category is where you define what happens to&amp;nbsp;our message&amp;nbsp;object when it is caught.&amp;nbsp;&lt;/p&gt; &lt;p&gt;I modify the Sinks section&amp;nbsp;to have one sink for the Application Event Log.&lt;/p&gt; &lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_io6q_2NOAVQ/Rp6T11_7OCI/AAAAAAAAAFo/WwO-wbnPROE/s1600-h/SinkSetup.jpg"&gt;&lt;img alt="Sink Setup" src="http://3.bp.blogspot.com/_io6q_2NOAVQ/Rp6T11_7OCI/AAAAAAAAAFo/WwO-wbnPROE/s320/SinkSetup.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Modify the categories section to have the three categories defined during the implementation step&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Information  &lt;li&gt;Warning  &lt;li&gt;Error&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Notice how each category has a single destination. The destination tells Enterprise library to use the default Text Formatter and send it to the Application Event Log Sink.&lt;/p&gt; &lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_io6q_2NOAVQ/Rp6T2F_7ODI/AAAAAAAAAFw/4mWrifikbO8/s1600-h/LoggingCategory.jpg"&gt;&lt;img alt="Logging Category" src="http://4.bp.blogspot.com/_io6q_2NOAVQ/Rp6T2F_7ODI/AAAAAAAAAFw/4mWrifikbO8/s320/LoggingCategory.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;One last step in logging is to set up a default category. I like to set mine to default to Error.&lt;/p&gt; &lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6T2l_7OEI/AAAAAAAAAF4/XZJClu3jQ9U/s1600-h/DefaultCategory.jpg"&gt;&lt;img alt="Default Category" src="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6T2l_7OEI/AAAAAAAAAF4/XZJClu3jQ9U/s320/DefaultCategory.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;At this point your application should be able to use&amp;nbsp;LogInformational(&lt;span style="color: blue"&gt;string&lt;/span&gt; message) and LogWarning(&lt;span style="color: blue"&gt;string&lt;/span&gt; message)with no problems. Setting up the exception handling will take care of the rest.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Exception Handling Configuration&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Select your app node and choose to add the Exception Handling Application Block.&amp;nbsp;Select the application block and add a new Exception Policy with the name Error. Add a new Exception Type to the policy that catches all Exceptions. Finally add a new Logging Handler.&lt;/p&gt; &lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_io6q_2NOAVQ/Rp6UF1_7OFI/AAAAAAAAAGA/1l0D7sessRI/s1600-h/ErrorExceptionPolicy.jpg"&gt;&lt;img alt="Error Exception Policy" src="http://3.bp.blogspot.com/_io6q_2NOAVQ/Rp6UF1_7OFI/AAAAAAAAAGA/1l0D7sessRI/s320/ErrorExceptionPolicy.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The configuration I use for the Logging Handler of the Error Exception Policy is: &lt;/p&gt; &lt;table cellspacing="0" cellpadding="2" width="355" border="1" unselectable="on"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="198"&gt;LogCategory&lt;/td&gt; &lt;td valign="top" width="155"&gt;Error&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="198"&gt;Priority&lt;/td&gt; &lt;td valign="top" width="155"&gt;10&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="198"&gt;Severity&lt;/td&gt; &lt;td valign="top" width="158"&gt;Error&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;The Warning exception policy is exactly like the Error but with the following values for the Logging Handler:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2" width="400" border="1" unselectable="on"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;LogCategory&lt;/td&gt; &lt;td valign="top" width="198"&gt;Warning&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;Priority&lt;/td&gt; &lt;td valign="top" width="198"&gt;5&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;Severity&lt;/td&gt; &lt;td valign="top" width="198"&gt;Warning&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rp6UGV_7OGI/AAAAAAAAAGI/d5YZzHM8TYg/s1600-h/WarningExceptionPolicy.jpg"&gt;&lt;img alt="Warning Exception Policy" src="http://1.bp.blogspot.com/_io6q_2NOAVQ/Rp6UGV_7OGI/AAAAAAAAAGI/d5YZzHM8TYg/s320/WarningExceptionPolicy.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;With both exception policies setup and using the logging our&amp;nbsp;ILogging class is fully functional. Now it is a simple configuration setting to turn on and off the different logging levels.&lt;/p&gt; &lt;p&gt;Any value larger than the MinimumPriority will be logged. Anything less will not be logged, simple. The values of the categories are: Error-10, Warning-5, and Information-1. I like to set the MinimumPriority to 10 in production.&lt;/p&gt; &lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6UGl_7OHI/AAAAAAAAAGQ/mS3HOpvae9A/s1600-h/MinimumPriority.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_" alt="" src="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6UGl_7OHI/AAAAAAAAAGQ/mS3HOpvae9A/s320/MinimumPriority.jpg" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;h4&gt;Wrap Up&lt;/h4&gt; &lt;p&gt;So far this method of logging has been very useful. There is a lot more you can do from here such as sending emails when a warning happens. I've only laid the foundation of a logging methodology. &lt;/p&gt; &lt;p&gt;In the future I plan to evaluate how the Enterprise Library 3.0 – April 2007 version handles logging and create an implementation for ILogger. Other things I've thought about is to create some sort of LoggingFactory or ServiceProvider to really disconnect my application from the implementation. Ideally I don't want to have any referenced dlls in my apps. &lt;/p&gt; &lt;p&gt;Tell me what your experience has been with logging. What works well for you, what doesn't. Do you see yourself using the ILogger interface. Please let me know because&amp;nbsp;I would love to improve on what I have.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-7590345342394777649?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=67XbcPga"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=dWwPpv1z"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=dWwPpv1z" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/NxhcPfSbCPE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/7590345342394777649/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=7590345342394777649" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7590345342394777649?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7590345342394777649?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/NxhcPfSbCPE/how-to-implement-logging.html" title="How to Implement logging" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_io6q_2NOAVQ/Rp6T1l_7OBI/AAAAAAAAAFg/QUWpVxfnReE/s72-c/AddBlock.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/07/how-to-implement-logging.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEEQHY6fSp7ImA9WB5XFkU.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-542269154724827467</id><published>2007-07-17T08:36:00.001-07:00</published><updated>2007-07-17T08:36:41.815-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-17T08:36:41.815-07:00</app:edited><title>When a Bug is Found</title><content type="html">&lt;p&gt;&lt;a href="http://www.jamesshore.com/Agile-Book/no_bugs.html"&gt;James Shore&lt;/a&gt;&amp;nbsp;talks about the concept of being bug free and has many recommendations on how to reach that goal. At my desk I have the following guide hanging on the wall to&amp;nbsp;help me in my quest.&lt;/p&gt; &lt;p&gt;First:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Create a Test to Prove it:&lt;/li&gt; &lt;li&gt;Fix it:&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You've fixed the problem, but you haven't solved the underlying cause.&lt;/p&gt; &lt;p&gt;Discover why that bug occurred.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Discuss the code process with your pairing partner.&lt;/li&gt; &lt;li&gt;Is there a design flaw that made this bug possible?&lt;/li&gt; &lt;li&gt;Can you change an API to make such bugs more obvious?&lt;/li&gt; &lt;li&gt;Is there some way to refactor the code that would make this kind of bug less likely?&lt;/li&gt; &lt;li&gt;Improve your design.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you've identified a systemic problem, discuss it with the rest of you team in you next meeting or iteration retrospective.&lt;/p&gt; &lt;p&gt;Tell people what went wrong so they can avoid that mistake in the future.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-542269154724827467?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=uVFnKtVq"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=GO5GRbH9"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=GO5GRbH9" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/wLkF2muoWSg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/542269154724827467/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=542269154724827467" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/542269154724827467?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/542269154724827467?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/wLkF2muoWSg/when-bug-is-found.html" title="When a Bug is Found" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/07/when-bug-is-found.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUCQ3g6cCp7ImA9WB5XFkQ.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-7647068178787068035</id><published>2007-07-11T12:36:00.001-07:00</published><updated>2007-07-17T10:27:42.618-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-17T10:27:42.618-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Ruby" /><title>Ruby Array Randomize</title><content type="html">&lt;p&gt;I needed the ability to randomize the order of an array. This is useful when you have a set collection of questions in a survey&amp;nbsp;that you want to shuffle before you present them to the user.&amp;nbsp;After looking around a bit,&amp;nbsp;I didn't find anything that worked.&amp;nbsp;Here is what I pieced together with my limited knowledge of Ruby.&amp;nbsp;&lt;/p&gt; &lt;div class="code"&gt; &lt;div&gt;&lt;span class="comments"&gt;# Created by Brig R. Lamoreaux&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="comments"&gt;# Date: 11 July 2007&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="comments"&gt;# Time: 10:38 am&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="comments"&gt;# Randomize the contents of an Array&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class=""&gt;Array&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class=""&gt;randomize&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a=&lt;span class="keyword"&gt;self&lt;/span&gt;.dup&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result = []&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;self&lt;/span&gt;.length.times &lt;span class="keyword"&gt;do&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result &lt;span class="symbol"&gt;&amp;lt;&amp;lt;&lt;/span&gt; a.slice!(rand(a.length))&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;return&lt;/span&gt; result&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;def&lt;/span&gt; &lt;span class=""&gt;randomize!&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a=&lt;span class="keyword"&gt;self&lt;/span&gt;.dup&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result = []&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;self&lt;/span&gt;.length.times &lt;span class="keyword"&gt;do&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result &lt;span class="symbol"&gt;&amp;lt;&amp;lt;&lt;/span&gt; a.slice!(rand(a.length))&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;self&lt;/span&gt;.replace result&lt;/div&gt; &lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Here are some test that make sure it really works.&lt;/p&gt; &lt;div class="code"&gt; &lt;div&gt;&lt;span class="keyword"&gt;puts&lt;/span&gt; &lt;span class="string"&gt;"Randomize Tests"&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;x = [1, 2, 3, 4, 5]&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;print &lt;/span&gt;&lt;span class="string"&gt;"x: "&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;x.&lt;/span&gt;&lt;span class="keyword"&gt;each do&lt;/span&gt;&lt;span class=""&gt; |i|&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;print &lt;/span&gt;&lt;span class="string"&gt;"#{i}"&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;y = x.randomize&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;print &lt;/span&gt;&lt;span class="string"&gt;"\ny: "&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;y.&lt;span class="keyword"&gt;each do&lt;/span&gt; |i|&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;print &lt;/span&gt;&lt;span class="string"&gt;"#{i}"&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;x.randomize! &lt;/span&gt;&lt;span class="comments"&gt;# x is now [3, 5, 4, 1, 2]&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;print &lt;/span&gt;&lt;span class="string"&gt;"\nx: "&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;x.&lt;span class="keyword"&gt;each do&lt;/span&gt; |i|&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;print &lt;/span&gt;&lt;span class="string"&gt;"#{i}"&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;x.randomize! &lt;/span&gt;&lt;span class="comments"&gt;# x is now [3, 5, 4, 1, 2]&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;print &lt;/span&gt;&lt;span class="string"&gt;"\nx: "&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;x.&lt;span class="keyword"&gt;each do&lt;/span&gt; |i|&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;print &lt;/span&gt;&lt;span class="string"&gt;"#{i}"&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Special thanks to&amp;nbsp;&lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;syntaxhighlighter&lt;/a&gt;&amp;nbsp;on providing styles for ruby syntax highlighting.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;Update:&lt;/i&gt;&lt;/b&gt; After doing a search for array shuffle, I found some &lt;a href="http://snippets.dzone.com/posts/show/2994"&gt;useful examples.&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-7647068178787068035?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=AonfjjRI"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=vXwEO1OW"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=vXwEO1OW" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/t1PTplWaRRA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/7647068178787068035/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=7647068178787068035" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7647068178787068035?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7647068178787068035?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/t1PTplWaRRA/ruby-array-randomize.html" title="Ruby Array Randomize" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/07/ruby-array-randomize.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4NRnc4eSp7ImA9WB5QFkg.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-7075623740653215355</id><published>2007-07-05T10:36:00.001-07:00</published><updated>2007-07-05T10:36:37.931-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-05T10:36:37.931-07:00</app:edited><title>Balance Simple Code and Expert Knowledge</title><content type="html">&lt;p&gt;I enjoyed reading &lt;a href="http://odetocode.com/Blogs/scott/archive/2007/07/02/11050.aspx"&gt;What’s Wrong With This Code (#16)&lt;/a&gt;&amp;nbsp;because it got me thinking about having in depth knowledge on a subject and &lt;a href="http://en.wikipedia.org/wiki/KISS_principle"&gt;KISS&lt;/a&gt;. When I saw the code, I thought it was an overkill&amp;nbsp;for the problem. In the comments I offered a solution that is simple and what seems to have solved the problem. I'll admit that I'm not an expert on JavaScript and I wouldn't be surprised if someone pointed out serious flaws with my code. While I make my way on the path to&amp;nbsp;becoming an expert, I'll continue to solve problems with simple solutions. Borrowing&amp;nbsp;the concept Red/Green/Refactor, from &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt;, I think it is important for developers to follow the KISS/Learn/Revise model of development. It's impossible for me to become an expert in every field. But I should be trying to become an expert in the fields that I deal with. Just like eating an elephant, I needs to learn the technologies one piece at a time. The easiest way I do that is to glean from other's insight.&amp;nbsp;It is amazing&amp;nbsp;how much useful information is shared through blogs. I make it a practice to read the thoughts of the leaders in the industry several times a week. More importantly I am sharing my own thoughts. I recently &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=Brig+Lamoreaux"&gt;searched my name&lt;/a&gt; and found that other people have found some of my solutions useful. &lt;/p&gt; &lt;p&gt;In answer to how to become an expert while keeping things simple, my solution is slow and steady, one article at a time. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-7075623740653215355?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=jbmG3aza"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=KxghdkKb"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=KxghdkKb" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/u72Z2AiUzeY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/7075623740653215355/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=7075623740653215355" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7075623740653215355?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/7075623740653215355?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/u72Z2AiUzeY/balance-simple-code-and-expert.html" title="Balance Simple Code and Expert Knowledge" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/07/balance-simple-code-and-expert.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcARXg5fSp7ImA9WB5QE0Q.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-6188745166108268805</id><published>2007-07-02T09:34:00.001-07:00</published><updated>2007-07-02T09:34:04.625-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-02T09:34:04.625-07:00</app:edited><title>Keeping the Blog Alive</title><content type="html">&lt;p&gt;My daily routine involves reading several different blogs as my way of taking advantage of other people's great ideas. Most of the things that I read are technical, but mix in with the bunch has been a &lt;a href="http://www.problogger.net/"&gt;blog about blogs&lt;/a&gt;. For the most part many of the articles I read are in essence a variation on the same theme. It is refreshing to find a diamond in the rough article that really helps to clarify an idea or answer a difficult question. I don't expect this post to be a diamond, but I do plan for it to help me stay consistent with delivering my own ideas and experiences. The one piece of advice I've read is to keep a regular schedule of posting and that is what I'll do.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-6188745166108268805?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=Un2mG1r3"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=ufTvKzPR"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=ufTvKzPR" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/hw7e4Z0HHzw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/6188745166108268805/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=6188745166108268805" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6188745166108268805?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/6188745166108268805?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/hw7e4Z0HHzw/keeping-blog-alive.html" title="Keeping the Blog Alive" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/07/keeping-blog-alive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcBRH8yeCp7ImA9WB5RFUo.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-1429460397535830247</id><published>2007-06-22T21:30:00.001-07:00</published><updated>2007-06-22T21:30:55.190-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-06-22T21:30:55.190-07:00</app:edited><title>Objects, Data, and Actions</title><content type="html">&lt;p&gt;I was recently asked what objects are in programming and how a database is related to them. Thinking long and hard about it, I came up with the following example:&lt;/p&gt; &lt;p&gt;Objects are containers that stores data and code. In fact objects are just like real life objects. Imagine an Animal object. Pick any animal you like, it will have Data and Actions. The data would be things like Height, Length, Age, Name, Color. And Actions could be Speak, Walk, Jump, Eat.  &lt;p&gt;So a Lion could be: &lt;p&gt;MyLion.Height = 4 &lt;p&gt;MyLion.Length = 7 &lt;p&gt;MyLion.Age = 4 &lt;p&gt;MyLion.Name = Mufasa &lt;p&gt;MyLion.Color = Yellow and Brown &lt;p&gt;Notice how these values can easily be stored in a database. But what about the actions? When MyLion performs an action, something gets done. &lt;p&gt;MyLion.Speak -&amp;gt; from my speakers I hear a &amp;nbsp;"ROAR!!!!" &lt;p&gt;MyLion.Eat -&amp;gt;&amp;nbsp; Now MyLion.Length = 7.5 &lt;p&gt;See how actions can't really be stored as a value because they do something. A relational database can store all of my Properties but can't store what will happen when my object performs an action. But an OODB database can store objects. So I could save MyLion right to the database. I could also save MyChicken and MyHippo. Each object would do something a little different when I ask it to Speak or Eat. &lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-1429460397535830247?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=9d6PALaI"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=IsIHkOPk"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=IsIHkOPk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/Fzm_sUzMjTI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/1429460397535830247/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=1429460397535830247" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/1429460397535830247?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/1429460397535830247?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/Fzm_sUzMjTI/objects-data-and-actions.html" title="Objects, Data, and Actions" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/06/objects-data-and-actions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04FSH09eCp7ImA9WB5SGE4.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-795548939358030299</id><published>2007-06-14T08:45:00.001-07:00</published><updated>2007-06-14T08:45:19.360-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-06-14T08:45:19.360-07:00</app:edited><title>Live Writer</title><content type="html">&lt;p&gt;I've downloaded Windows Live Writer to see how well it will do posting to Blogspot.com, and so far I am very impressed with the interface. One of the features of Live Writer is the ability to select View -&amp;gt; Web Preview. This shows me what the current post will look like using the templates and styles I have set up at Blogspot. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-795548939358030299?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=Ta7z6MUb"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=GaYvQv36"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=GaYvQv36" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/36ZL1HiEPKk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/795548939358030299/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=795548939358030299" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/795548939358030299?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/795548939358030299?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/36ZL1HiEPKk/live-writer.html" title="Live Writer" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.framework-it.net/2007/06/live-writer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIDQn86cCp7ImA9WBBaFUo.&quot;"><id>tag:blogger.com,1999:blog-36357903.post-5425689633105692545</id><published>2006-12-29T16:05:00.000-07:00</published><updated>2007-01-23T09:42:53.118-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-01-23T09:42:53.118-07:00</app:edited><title>Anonymous Delegates</title><content type="html">&lt;p&gt; I never thought I would use anonymous delegates mostly because I didn't fully understand what benefit they could give me. If I can't get something out of a new tool or methodology, why use it. With anonymous delegates I can get a lot of great things. Specifically simple solutions to my problems &lt;/p&gt; &lt;h2&gt; Problem &lt;/h2&gt; &lt;p&gt; What is the best way to add filtering capability on a specilized collection? After looking at related problem sets, I found the &lt;code&gt;public T Find(System.Predicate&amp;lt;T&amp;gt; match)&lt;/code&gt; method which is implemented on &lt;code&gt;System.Collections.Generic.List&lt;/code&gt;. A Predicateis a special delegate that takes in an object, and returns true. Suppose I have a collection of names and I would like to check if a name is long. I could do the following &lt;/p&gt; &lt;div style="BACKGROUND:white none repeat scroll 0% 50%; -moz-background-clip:-moz-initial; -moz-background-origin:-moz-initial; -moz-background-inline-policy:-moz-initial; FONT-FAMILY:Consolas; FONT-SIZE:10pt; COLOR:black"&gt; &lt;p style="MARGIN:0px"&gt; &lt;span style="COLOR:blue"&gt;class&lt;/span&gt; &lt;span style="COLOR:teal"&gt;Program&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;[] args) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; names = &lt;span style="COLOR:blue"&gt;new &lt;/span&gt;&lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Mary"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"George"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Hank"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Billy"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Susan"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Ed"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine(IsLongName(names[4]));&lt;br/&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;bool&lt;/span&gt; IsLongName(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt; name) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt; name.Length &amp;gt; 4; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;/div&gt; &lt;br/&gt; I define a method that checks if the length of the name is greater than 4. Well my method &lt;code&gt;IsLongName&lt;/code&gt; is in fact a &lt;code&gt;System.Predicate&lt;/code&gt;. Since the &lt;code&gt;Find()&lt;/code&gt; method takes a Predicate as the match pattern. I can pass this method to the &lt;code&gt;Find()&lt;/code&gt; method and get a collection of just long names. Let's use &lt;code&gt;Find()&lt;/code&gt; to get a list of names that are long names. First I'll need to wrap the &lt;code&gt;IsLongNamefunction&lt;/code&gt; inside of a delegate. Then I can pass that delegate into the &lt;code&gt;Find()&lt;/code&gt; method.&lt;br/&gt; &lt;br/&gt; &lt;div style="BACKGROUND:white none repeat scroll 0% 50%; -moz-background-clip:-moz-initial; -moz-background-origin:-moz-initial; -moz-background-inline-policy:-moz-initial; FONT-FAMILY:Consolas; FONT-SIZE:10pt; COLOR:black"&gt; &lt;p style="MARGIN:0px"&gt; &lt;span style="COLOR:blue"&gt;class&lt;/span&gt; &lt;span style="COLOR:teal"&gt;Program&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;[] args) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; names = &lt;span style="COLOR:blue"&gt;new &lt;/span&gt;&lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Mary"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"George"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Hank"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Billy"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Susan"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Ed"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:green"&gt;// WrapIsLongName up insided of Predicate delegate.&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;string&amp;gt; longNameMethod = &lt;span style="COLOR:blue"&gt;new &lt;/span&gt;&lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(IsLongName); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; longNames = names.FindAll(longNameMethod); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR:maroon"&gt;"There are {0} long names"&lt;/span&gt;,&lt;span style="COLOR:maroon"&gt; &lt;/span&gt;longNames.Count); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.ReadLine(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;bool&lt;/span&gt; IsLongName(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt; name) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt; name.Length &amp;gt; 4; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;/div&gt; &lt;p&gt; The output is: &lt;code&gt;There are 3 long names.&lt;/code&gt; What if I need to get a list of just names that start with the letters M Gand B? No problem, create a new method that matches the signature of a Predicate and you are in business. &lt;/p&gt; &lt;div style="BACKGROUND:white none repeat scroll 0% 50%; -moz-background-clip:-moz-initial; -moz-background-origin:-moz-initial; -moz-background-inline-policy:-moz-initial; FONT-FAMILY:Consolas; FONT-SIZE:10pt; COLOR:black"&gt; &lt;p style="MARGIN:0px"&gt; &lt;span style="COLOR:blue"&gt;class&lt;/span&gt; &lt;span style="COLOR:teal"&gt;Program&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;[] args) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; names = &lt;span style="COLOR:blue"&gt;new &lt;/span&gt;&lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Mary"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"George"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Hank"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Billy"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Susan"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Ed"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:green"&gt;// WrapIsLongName up insided of Predicate delegate.&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;string&amp;gt; longNameMethod = &lt;span style="COLOR:blue"&gt;new&lt;/span&gt;&lt;span style="COLOR:teal"&gt; Predicate&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(IsLongName); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;string&amp;gt; mgbName = &lt;span style="COLOR:blue"&gt;new&lt;/span&gt;&lt;span style="COLOR:teal"&gt; Predicate&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(IsMGBName); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; longNames = names.FindAll(longNameMethod); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; mgbNames = names.FindAll(mgbName); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine("There are {0} long names.", longNames.Count); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine("There are {0} MGB names.", mgbNames.Count); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.ReadLine(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;bool&lt;/span&gt; IsLongName(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt; name) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt;name.Length &amp;gt; 4; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;bool&lt;/span&gt; IsMGBName(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt; name) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;if&lt;/span&gt;(name.StartsWith(&lt;span style="COLOR:maroon"&gt;"M"&lt;/span&gt;) || name.StartsWith("G") || name.StartsWith(&lt;span style="COLOR:maroon"&gt;"B"&lt;/span&gt;)) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt; &lt;span style="COLOR:blue"&gt;true&lt;/span&gt;; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt;&lt;span style="COLOR:blue"&gt;false&lt;/span&gt;; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;/div&gt; &lt;br/&gt; The console shows: &lt;code&gt;There are 3 long names.There are 3 MGB names.&lt;/code&gt; &lt;h2&gt; Clean it up &lt;/h2&gt; Now I see how powerful and convenient it is to be able to pass in a method that contains the logic to find an item in a list. But let's see how anonymous delegates can help out. All that an anonymous delegate gives us is the ability to create our methods on the fly; no need to have random methods sitting around that won't be used.&lt;br/&gt; &lt;br/&gt; &lt;div style="BACKGROUND:white none repeat scroll 0% 50%; -moz-background-clip:-moz-initial; -moz-background-origin:-moz-initial; -moz-background-inline-policy:-moz-initial; FONT-FAMILY:Consolas; FONT-SIZE:10pt; COLOR:black"&gt; &lt;p style="MARGIN:0px"&gt; &lt;span style="COLOR:blue"&gt;class&lt;/span&gt; &lt;span style="COLOR:teal"&gt;Program&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;[] args) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; names = &lt;span style="COLOR:blue"&gt;new &lt;/span&gt;&lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Mary"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"George"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Hank"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Billy"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Susan"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Ed"&lt;/span&gt;); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:green"&gt;// WrapIsLongName up insided of Predicate delegate.&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;string&amp;gt; longNameMethod = &lt;span style="COLOR:blue"&gt;new&lt;/span&gt;&lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(IsLongName); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;string&amp;gt; mgbName = &lt;span style="COLOR:blue"&gt;new&lt;/span&gt;&lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(IsMGBName); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; longNames = names.FindAll(&lt;span style="COLOR:blue"&gt;delegate&lt;/span&gt;(string name) { &lt;span style="COLOR:blue"&gt;return&lt;/span&gt; name.Length &amp;gt; 4; }); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; mgbNames = names.FindAll( &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;delegate&lt;/span&gt;(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt; name) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="COLOR:blue"&gt;if&lt;/span&gt; (name.StartsWith(&lt;span style="COLOR:maroon"&gt;"M"&lt;/span&gt;)|| name.StartsWith(&lt;span style="COLOR:maroon"&gt;"G"&lt;/span&gt;) || name.StartsWith("B")) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{ &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt; &lt;span style="COLOR:blue"&gt;true&lt;/span&gt;; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;} &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="COLOR:blue"&gt;return&lt;/span&gt; &lt;span style="COLOR:blue"&gt;false&lt;/span&gt;; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine("There are {0} long names.", longNames.Count); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine("There are {0} MGB names.", mgbNames.Count); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.ReadLine(); &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt; &lt;/div&gt; &lt;br/&gt; The console shows: &lt;code&gt;There are 3 long names.There are 3 MGB names.&lt;/code&gt; &lt;h3&gt; Adding Parameters &lt;/h3&gt; What if my special search needs an additional parameter? Just create a wrapper class&lt;br/&gt; &lt;div style="BACKGROUND:white none repeat scroll 0% 50%; -moz-background-clip:-moz-initial; -moz-background-origin:-moz-initial; -moz-background-inline-policy:-moz-initial; FONT-FAMILY:Consolas; FONT-SIZE:10pt; COLOR:black"&gt; &lt;p style="MARGIN:0px"&gt; &lt;span style="COLOR:blue"&gt;class&lt;/span&gt; &lt;span style="COLOR:teal"&gt;Program&lt;/span&gt; &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt; &lt;span style="COLOR:blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;[] args) &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt; &lt;p style="MARGIN:0px"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; names = &lt;span style="COLOR:blue"&gt;new&lt;/span&gt;&lt;span style="COLOR:teal"&gt;  List&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt;(); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp; &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Mary"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"George"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Hank"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Billy"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Susan"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; names.Add(&lt;span style="COLOR:maroon"&gt;"Ed"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp; &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;string&amp;gt; isNameBilly = IsName(&lt;span style="COLOR:maroon"&gt;"Billy"&lt;/span&gt;); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;List&lt;/span&gt;&amp;lt;string&amp;gt; billyNames = names.FindAll(isNameBilly); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.WriteLine("There are {0} Billy names.", billyNames.Count); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp; &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:teal"&gt;Console&lt;/span&gt;.ReadLine(); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp; &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span style="COLOR:blue"&gt;static&lt;/span&gt;  &lt;span style="COLOR:teal"&gt;Predicate&lt;/span&gt;&amp;lt;&lt;span style="COLOR:blue"&gt;string&lt;/span&gt;&amp;gt; IsName(&lt;span style="COLOR:blue"&gt;string&lt;/span&gt; name) &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; { &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt;&lt;span style="COLOR:blue"&gt;  delegate&lt;/span&gt;(&lt;span style="COLOR:blue"&gt;string &lt;/span&gt;item) &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; { &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style="COLOR:blue"&gt;return&lt;/span&gt; item.Equals(name); &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }; &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; } &lt;/p&gt;  &lt;p style="MARGIN:0px"&gt;  &amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;/div&gt; &lt;p&gt;  I can create a method that returns a method. What is amazing about this is the ability to pass extra parameter into the dynamic method. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36357903-5425689633105692545?l=blog.framework-it.net'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=3EWyuvNz"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/BrigLamoreaux?a=4HMmseBk"&gt;&lt;img src="http://feeds.feedburner.com/~f/BrigLamoreaux?i=4HMmseBk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BrigLamoreaux/~4/8qsgowpbQv0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.framework-it.net/feeds/5425689633105692545/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=36357903&amp;postID=5425689633105692545" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5425689633105692545?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/36357903/posts/default/5425689633105692545?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BrigLamoreaux/~3/8qsgowpbQv0/anonymous-delegates.html" title="Anonymous Delegates" /><author><name>Brig Lamoreaux</name><uri>http://www.blogger.com/profile/17969669166966761026</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="11783431371362130385" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.framework-it.net/2006/12/anonymous-delegates.html</feedburner:origLink></entry></feed>
