<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Quiz: What runs before Main()?</title><link>http://blogs.msdn.com/jmstall/archive/2007/10/14/quiz-what-runs-before-main.aspx</link><description>Quiz: What managed code runs before managed Main() in your program startup path? Answers : I note "managed code", because obviously the CLR startup code gets executed, as does other native startup code. 1) The common answer is static constructors referenced</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Techy News Blog &amp;raquo; Quiz: What runs before Main()?</title><link>http://blogs.msdn.com/jmstall/archive/2007/10/14/quiz-what-runs-before-main.aspx#5450573</link><pubDate>Sun, 14 Oct 2007 15:13:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5450573</guid><dc:creator>Techy News Blog » Quiz: What runs before Main()?</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.artofbam.com/wordpress/?p=8306"&gt;http://www.artofbam.com/wordpress/?p=8306&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Quiz: What runs before Main()?</title><link>http://blogs.msdn.com/jmstall/archive/2007/10/14/quiz-what-runs-before-main.aspx#5492989</link><pubDate>Wed, 17 Oct 2007 17:52:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5492989</guid><dc:creator>GP</dc:creator><description>&lt;p&gt;for Nr 2 (managed Code in the CLR's startup path) I cannot get the point. In theroy (that the CLR injects some managed code) it sounds ok.&lt;/p&gt;
&lt;p&gt;Maybe just the example is misleading, because System.Security.PermissionSet..cctor is just the class constructor (static constructor) of PermissionSet. So a do not see a difference from Nr 1.&lt;/p&gt;
&lt;p&gt;Or did you meen that the cctor is called without a _direct_ reference from Main()? If yes: Where is this call issued? It is hardcoded within the (unmanged) CLR Code? Or is it caused by the initalization of the AppDomain Instance?&lt;/p&gt;</description></item><item><title>re: Quiz: What runs before Main()?</title><link>http://blogs.msdn.com/jmstall/archive/2007/10/14/quiz-what-runs-before-main.aspx#5495211</link><pubDate>Wed, 17 Oct 2007 19:52:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5495211</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;GP - #2 as a cctor is less distinct than #1. In previous CLR versions, it used to be something like &amp;quot;AppDomain::Setup&amp;quot;. &lt;/p&gt;
&lt;p&gt;Regardless, it's still issued without a direct reference by Main(). These sort of calls can occur from the CLR. &lt;/p&gt;
</description></item><item><title>re: Quiz: What runs before Main()?</title><link>http://blogs.msdn.com/jmstall/archive/2007/10/14/quiz-what-runs-before-main.aspx#7013413</link><pubDate>Mon, 07 Jan 2008 09:32:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7013413</guid><dc:creator>Yuhong Bao</dc:creator><description>&lt;p&gt;MC++? Is that really C++/CLI?&lt;/p&gt;</description></item><item><title>re: Quiz: What runs before Main()?</title><link>http://blogs.msdn.com/jmstall/archive/2007/10/14/quiz-what-runs-before-main.aspx#7019514</link><pubDate>Mon, 07 Jan 2008 23:11:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7019514</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;Yuhong - essentially yes. See &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/msdnmag/issues/05/02/PureC/"&gt;http://msdn.microsoft.com/msdnmag/issues/05/02/PureC/&lt;/a&gt; for more.&lt;/p&gt;
</description></item></channel></rss>