<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>C# Infrequently Asked Questions</title>
        <link>http://geekswithblogs.net/mrnat/category/1485.aspx</link>
        <description>C# Infrequently Asked Questions</description>
        <language>en-US</language>
        <copyright>Nat Luengnaruemitchai</copyright>
        <managingEditor>mr_nat@hotmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>C# IAQ #6: Why Can't I Throw An Exception in GUI Thread and Let Application.ThreadException Handle It?</title>
            <link>http://geekswithblogs.net/mrnat/archive/2005/06/16/44022.aspx</link>
            <description>If you ever use do multi-threaded programming and use Control.Invoke to invoke a method on GUI Thread, you might experience this problem before. You throw an exception with the hope that ThreadException will get it but wrong. It won't get it as the method Control.Invoke will actually catch the exception and then serialize it and throw it back in the calling thread. This is annoying since you expect to use ThreadException to handle it.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=44022"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=44022" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mrnat/aggbug/44022.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nat Luengnaruemitchai</dc:creator>
            <guid>http://geekswithblogs.net/mrnat/archive/2005/06/16/44022.aspx</guid>
            <pubDate>Thu, 16 Jun 2005 14:27:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mrnat/comments/44022.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mrnat/archive/2005/06/16/44022.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mrnat/comments/commentRss/44022.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mrnat/services/trackbacks/44022.aspx</trackback:ping>
        </item>
        <item>
            <title>C# IAQ #5: Why C# Doesn't Have Class Destructor?</title>
            <link>http://geekswithblogs.net/mrnat/archive/2005/04/27/38503.aspx</link>
            <description>Sometimes, I have to connect to unmanaged system in which I have to initialize something at the beginning and need to clean up at the end. In this case, instead of writing a singleton class that have a finalizer, can't I have a class destructor to do this job?&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=38503"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=38503" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mrnat/aggbug/38503.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nat Luengnaruemitchai</dc:creator>
            <guid>http://geekswithblogs.net/mrnat/archive/2005/04/27/38503.aspx</guid>
            <pubDate>Tue, 26 Apr 2005 17:32:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mrnat/comments/38503.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mrnat/archive/2005/04/27/38503.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mrnat/comments/commentRss/38503.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mrnat/services/trackbacks/38503.aspx</trackback:ping>
        </item>
        <item>
            <title>C# IAQ #4: Why Does Not C# Compiler Provide An Ability To Set Stack Size?</title>
            <link>http://geekswithblogs.net/mrnat/archive/2005/04/15/34114.aspx</link>
            <description>&lt;P&gt;Why neitherC# compiler nor the language itself (through an ability of attribute) provide a way for developers to set their own stack size?&lt;/P&gt;
&lt;P&gt;Note: You can modify stack size manually through a utility called EditBin.exe (&lt;A href="http://blogs.geekdojo.net/richard/archive/2003/10/10/207.aspx"&gt;http://blogs.geekdojo.net/richard/archive/2003/10/10/207.aspx&lt;/A&gt;)&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=34114"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=34114" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mrnat/aggbug/34114.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nat Luengnaruemitchai</dc:creator>
            <guid>http://geekswithblogs.net/mrnat/archive/2005/04/15/34114.aspx</guid>
            <pubDate>Thu, 14 Apr 2005 20:33:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mrnat/comments/34114.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mrnat/archive/2005/04/15/34114.aspx#feedback</comments>
            <slash:comments>11</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mrnat/comments/commentRss/34114.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mrnat/services/trackbacks/34114.aspx</trackback:ping>
        </item>
        <item>
            <title>C# IAQ #3: Why DBNull.Vallue While null Already Exists?</title>
            <link>http://geekswithblogs.net/mrnat/archive/2005/04/15/34113.aspx</link>
            <description>Why does Microsoft introduce DBNull.Value while it can use null instead?&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=34113"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=34113" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mrnat/aggbug/34113.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nat Luengnaruemitchai</dc:creator>
            <guid>http://geekswithblogs.net/mrnat/archive/2005/04/15/34113.aspx</guid>
            <pubDate>Thu, 14 Apr 2005 20:17:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mrnat/comments/34113.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mrnat/archive/2005/04/15/34113.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mrnat/comments/commentRss/34113.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mrnat/services/trackbacks/34113.aspx</trackback:ping>
        </item>
        <item>
            <title>C# IAQ #2: Why Can't We Have Overload Operator Implemented As An Instance Method</title>
            <link>http://geekswithblogs.net/mrnat/archive/2005/04/08/28711.aspx</link>
            <description>&lt;P&gt;Due to c# specification, overloaded operator can only be implemented as a public static function only. This is unlike C++ where it allows both instance and static operator function. &lt;A href="http://blogs.msdn.com/ericgu"&gt;Eric Gunnerson &lt;/A&gt;did comment once that is because of the simplicity. &lt;/P&gt;
&lt;P&gt;Because of this limitation, you cannot declare an interface or an abstract class where you can define those operators and try to perform that operation on interface or an abstract class. This especially will impact generic class.&lt;/P&gt;
&lt;P&gt;More example to come later. Sorry for bad explanation.&lt;/P&gt;
&lt;P&gt;Update: Found a link I've seen before. &lt;A href="http://www.lambda-computing.com/publications/articles/generics/"&gt;http://www.lambda-computing.com/publications/articles/generics/&lt;/A&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=28711"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=28711" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mrnat/aggbug/28711.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nat Luengnaruemitchai</dc:creator>
            <guid>http://geekswithblogs.net/mrnat/archive/2005/04/08/28711.aspx</guid>
            <pubDate>Fri, 08 Apr 2005 11:24:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mrnat/comments/28711.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mrnat/archive/2005/04/08/28711.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mrnat/comments/commentRss/28711.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mrnat/services/trackbacks/28711.aspx</trackback:ping>
        </item>
        <item>
            <title>C# IAQ #1: Timezone</title>
            <link>http://geekswithblogs.net/mrnat/archive/2005/04/08/28643.aspx</link>
            <description>&lt;P&gt;I would like to start asking some questions in C# + .NET in which I don't have answers yet. If you guys know the answers, please help answer that. I will try to maintain the list of answers. Thanks :)&lt;/P&gt;
&lt;P&gt;To kick off an infrequently asked question awaiting for answer, I would like to ask why&lt;/P&gt;
&lt;P&gt;.NET BCL does not offer the API to convert time from one timezone to the other time zone. You have some way to convert time from other timezone to your local timezone by using DateTime.Parse hack though.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=28643"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=28643" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mrnat/aggbug/28643.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nat Luengnaruemitchai</dc:creator>
            <guid>http://geekswithblogs.net/mrnat/archive/2005/04/08/28643.aspx</guid>
            <pubDate>Thu, 07 Apr 2005 17:54:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mrnat/comments/28643.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mrnat/archive/2005/04/08/28643.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mrnat/comments/commentRss/28643.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mrnat/services/trackbacks/28643.aspx</trackback:ping>
        </item>
    </channel>
</rss>