<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Tips and Tricks</title>
        <link>http://blog.dotnetspeech.net/category/5.aspx</link>
        <description>Tips and Tricks</description>
        <language>en-US</language>
        <copyright>Jeff Certain</copyright>
        <managingEditor>jeff@dotnetspeech.net</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Make sure the speech API is installed</title>
            <link>http://blog.dotnetspeech.net/archive/2007/06/12/make-sure-the-speech-api-is-installed.aspx</link>
            <description>&lt;p&gt;&lt;font size="3"&gt;This should go without saying, but I've had recent problems with people not understanding this concept. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;If you're using System.Speech in Windows XP, you need to make sure that the speech recognition engine from SAPI 5.1 is installed. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;If you're deploying an application, make sure you include the SAPI 5.1 merge module in your installer.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blog.dotnetspeech.net/aggbug/13.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jeff Certain</dc:creator>
            <guid>http://blog.dotnetspeech.net/archive/2007/06/12/make-sure-the-speech-api-is-installed.aspx</guid>
            <pubDate>Tue, 12 Jun 2007 15:47:44 GMT</pubDate>
            <wfw:comment>http://blog.dotnetspeech.net/comments/13.aspx</wfw:comment>
            <comments>http://blog.dotnetspeech.net/archive/2007/06/12/make-sure-the-speech-api-is-installed.aspx#feedback</comments>
            <wfw:commentRss>http://blog.dotnetspeech.net/comments/commentRss/13.aspx</wfw:commentRss>
        </item>
        <item>
            <title>String.Format performance</title>
            <link>http://blog.dotnetspeech.net/archive/2007/05/16/string.format-performance.aspx</link>
            <description>&lt;p&gt;&lt;font size="3"&gt;Since I work with a lot of data-centric applications, I've come to really like String.Format. There's something nice about seeing all your single quotes without them being obscured by double quotes.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;For example, if I were adding a call to javascript function as an attribute of a control for use in client-side validation of an aspx page, I can use&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;&lt;em&gt;chk.Attributes.Add(&lt;font color="#a31515"&gt;"onclick"&lt;/font&gt;, &lt;/em&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;em&gt;&lt;font color="#0000ff"&gt;String&lt;/font&gt;.Format(&lt;font color="#a31515"&gt;"updateSelectedStructure({0},{1}.checked);"&lt;/font&gt;, workTicketId, chk.ClientID))&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;instead of &lt;/font&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;font size="3"&gt;
&lt;p&gt;&lt;em&gt;chk.Attributes.Add(&lt;font color="#a31515"&gt;"onclick"&lt;/font&gt;, &lt;font color="#a31515"&gt;"updateSelectedStructure("&lt;/font&gt; &amp;amp; workTicketId &amp;amp; &lt;font color="#a31515"&gt;","&lt;/font&gt; &amp;amp; chk.ClientID &amp;amp; &lt;font color="#a31515"&gt;".checked);"&lt;/font&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Personally, I find the first easier to comprehend. Of course, this led to a discussion with a colleague on the pros and cons of this approach. One question that came up was performance... which approach performs better, and by how much.&lt;/p&gt;
&lt;p&gt;So I instrumented a simple test case, similiar to the example above. It turns out that string concatenation is roughly an order of magnitude faster than calling String.Format. One of these days, I'll get around to comparing it to StringBuilder...&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;img src="http://blog.dotnetspeech.net/aggbug/7.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jeff Certain</dc:creator>
            <guid>http://blog.dotnetspeech.net/archive/2007/05/16/string.format-performance.aspx</guid>
            <pubDate>Wed, 16 May 2007 19:00:31 GMT</pubDate>
            <wfw:comment>http://blog.dotnetspeech.net/comments/7.aspx</wfw:comment>
            <comments>http://blog.dotnetspeech.net/archive/2007/05/16/string.format-performance.aspx#feedback</comments>
            <wfw:commentRss>http://blog.dotnetspeech.net/comments/commentRss/7.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Binding a Dictionary&lt;Of TKey, TValue&gt; to a ComboBox</title>
            <link>http://blog.dotnetspeech.net/archive/2007/05/16/binding-a-dictionaryof-tkey-tvalue-to-a-combobox.aspx</link>
            <description>&lt;p&gt;&lt;font size="3"&gt;I had cause recently to try to find a way to use a Dictionary as the data source for a WinForms combo box. There's a really cool, really simple way to do this, as described &lt;a target="_blank" href="http://www.madprops.org/cs/blogs/mabster/archive/2005/10/05/Bind-a-ComboBox-to-a-generic-Dictionary.aspx"&gt;here&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blog.dotnetspeech.net/aggbug/6.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jeff Certain</dc:creator>
            <guid>http://blog.dotnetspeech.net/archive/2007/05/16/binding-a-dictionaryof-tkey-tvalue-to-a-combobox.aspx</guid>
            <pubDate>Wed, 16 May 2007 18:29:04 GMT</pubDate>
            <wfw:comment>http://blog.dotnetspeech.net/comments/6.aspx</wfw:comment>
            <comments>http://blog.dotnetspeech.net/archive/2007/05/16/binding-a-dictionaryof-tkey-tvalue-to-a-combobox.aspx#feedback</comments>
            <wfw:commentRss>http://blog.dotnetspeech.net/comments/commentRss/6.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>