<?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>C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx</link><description>Here we go, with the last installment of the series... Language Details 1) How is decimal different from other C# types? 2) What kind of constructor is not legal on structs? Why? 3) What’s the difference between “out” and “[out]”? 4) When you write ulong</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589230</link><pubDate>Wed, 03 May 2006 19:12:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589230</guid><dc:creator>oldnewthing</dc:creator><description>7) Politics.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589248</link><pubDate>Wed, 03 May 2006 19:33:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589248</guid><dc:creator>Damien Guard</dc:creator><description>1. &amp;nbsp;Different from what other types?&lt;br&gt;2. A default constructor. &amp;nbsp;Because structs need to be initialized quickly especially for use in arrays etc.&lt;br&gt;3. out is a keyword, [out] is an identifier&lt;br&gt;4. UInt64.&lt;br&gt;5. IEnumerable to get an IEnumerator. &amp;nbsp;In .NET 2.0 it uses IEnumerable&amp;lt;T&amp;gt; to get an IEnumerator&amp;lt;T&amp;gt;.&lt;br&gt;7. Garbage collection.&lt;br&gt;11. To give the debugger something to tie up with source lines where there are no actual executable code.&lt;br&gt;14. 2000?&lt;br&gt;&lt;br&gt;[)amien</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589262</link><pubDate>Wed, 03 May 2006 19:42:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589262</guid><dc:creator>Sachin</dc:creator><description>12)&lt;br&gt;Change string to stringbuilder, strings are immutable.&lt;br&gt;&lt;br&gt;13)&lt;br&gt;Db (D flat :D)</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589284</link><pubDate>Wed, 03 May 2006 20:03:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589284</guid><dc:creator>Peter Ritchie</dc:creator><description>Raymond: or 7) religion ;-)&lt;br&gt;&lt;br&gt;Decimal: const Decimal is not supported by IL (like other value types) and C# will convert to static readonly Decimal; which also means the compiler will convert its use to a literal and never reference the original static readonly field again. &amp;nbsp;If the const Decimal is a public field of a class in a referenced assembly, any changes to the const Decimal in that referenced assembly will not be used unless the client assembly is recompiled. &amp;nbsp;Other value types do not do this.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589290</link><pubDate>Wed, 03 May 2006 20:10:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589290</guid><dc:creator>Ricky Dhatt</dc:creator><description>7) Finalization&lt;br&gt;8) Structs&lt;br&gt;9) Andy the C# Mascot&lt;br&gt;14) July 11 2000 in Orlando, FL. &amp;nbsp;</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589300</link><pubDate>Wed, 03 May 2006 20:19:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589300</guid><dc:creator>ericgu</dc:creator><description>On #1, I meant different from types like int or bool&lt;br&gt;&lt;br&gt;Eric</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589306</link><pubDate>Wed, 03 May 2006 20:28:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589306</guid><dc:creator>Jeremy D</dc:creator><description>7) Properties</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589332</link><pubDate>Wed, 03 May 2006 21:10:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589332</guid><dc:creator>Jeffrey L. Whitledge</dc:creator><description>&amp;quot;10) What is my most useless computer-related skill?&amp;quot;&lt;br&gt;&lt;br&gt;The ability to press SysRq without looking.&lt;br&gt;</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589359</link><pubDate>Wed, 03 May 2006 21:42:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589359</guid><dc:creator>Matt</dc:creator><description>6) Syste,.AttributeUsageAttribute&lt;br&gt;7) deterministinc finalization :)&lt;br&gt;&lt;br&gt;oh and 1) it's horrifically bloody slow?&lt;br&gt;&lt;br&gt;technically every integral and floating point number can have the operators +,-,* and / applied to them where the result is automatically the most precise of the two available.&lt;br&gt;&lt;br&gt;decimal breaks this since it won't play nice with doubles and floats (as they won't for a neat approximate superset)&lt;br&gt;&lt;br&gt;Technically this doesn't cover char or bool though.&lt;br&gt;&lt;br&gt;Just found it (Ithink) it's the only value type in the int,char,bool,integrals,floats which has instance constructor(s) such as new Decimal(double)&lt;br&gt;</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589361</link><pubDate>Wed, 03 May 2006 21:44:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589361</guid><dc:creator>JamesCurran</dc:creator><description>#12 I have no real idea (Sachin's sound good), but it does remind me of my experience solving problems on a C++ newsgroup.&lt;br&gt;&lt;br&gt;Every now &amp;amp; then, someone will post a problem, adding that the reason they need help is because, while it will fail when the app is run, when they step through it in a debugger, it works fine. &amp;nbsp; Eventually, I learned to respond &amp;quot;I don't need to see the code -- you are overunning a local array&amp;quot;.&lt;br&gt;</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589389</link><pubDate>Wed, 03 May 2006 22:19:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589389</guid><dc:creator>Bas Westerbaan</dc:creator><description>1. It's not natively implemented in the JIT. (I guess). You could make your own.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589390</link><pubDate>Wed, 03 May 2006 22:23:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589390</guid><dc:creator>Bas Westerbaan</dc:creator><description>7. Raw computing performance vs. good memory managment</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589391</link><pubDate>Wed, 03 May 2006 22:23:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589391</guid><dc:creator>Eric Wilson</dc:creator><description>#7) Ask whether multiple inheritance is a good thing :)</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589410</link><pubDate>Wed, 03 May 2006 23:14:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589410</guid><dc:creator>Richard</dc:creator><description>7. Partial template specialisation and template meta programming.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589504</link><pubDate>Thu, 04 May 2006 02:13:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589504</guid><dc:creator>Miral</dc:creator><description>#2 has always annoyed me. &amp;nbsp;What if I *want* my structs to have a default of &amp;quot;1&amp;quot; in a certain field. &amp;nbsp;Arg.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589505</link><pubDate>Thu, 04 May 2006 02:13:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589505</guid><dc:creator>Miral</dc:creator><description>#2 has always annoyed me. &amp;nbsp;What if I *want* my structs to have a default of &amp;quot;1&amp;quot; in a certain field. &amp;nbsp;Arg.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589522</link><pubDate>Thu, 04 May 2006 02:53:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589522</guid><dc:creator>ben</dc:creator><description>1) not a native type&lt;br&gt;2) parameterless constructors, I dont know why&lt;br&gt;3) ??&lt;br&gt;4) System.UInt64&lt;br&gt;5) IEnumerable &amp;amp; IEnumerator and IEnumerable&amp;lt;T&amp;gt; IEnumerator&amp;lt;T&amp;gt;&lt;br&gt;6) ??&lt;br&gt;7) Multiple inheritance&lt;br&gt;8 - 12) ??&lt;br&gt;13) Safe-C&lt;br&gt;14) PDC 98</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589567</link><pubDate>Thu, 04 May 2006 04:51:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589567</guid><dc:creator>TheMuuj</dc:creator><description>1) decimal is the only C# native type that is not a primitive type, and as such the compiler handles constants using a readonly field and an attribute with the binary form of the value. &amp;nbsp;Also, operators are provided by overloads (where as VB uses its own implementation of those operators, even in .NET 2 I believe).&lt;br&gt;2) Default constructors cannot be declared because creating an array of structs would not call this constructor for performance reasons&lt;br&gt;3) [Out] only applys to P/Invoke, I believe, and is for use with both references AND pointers&lt;br&gt;4) In .NET 2.0: System.UInt64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;br&gt;5) If possible, foreach tries to not use any interface (it uses static duck typing in order to prevent boxing), save for IDisposable. &amp;nbsp;However, it does use the IEnumerable/IEnumerator pattern (and the generic versions in .NET)&lt;br&gt;6) AssemblyUsageAttribute (which, in a chicken-egg twist, is applied to itself)&lt;br&gt;7) Pretty much anything, but especially Templates vs. Generics and/or runtime performance&lt;br&gt;8) ?? When the spec declares bankruptcy?&lt;br&gt;9) ??&lt;br&gt;10) ?? typing on an upside-down Dvorak keyboard?&lt;br&gt;11) To allow breakpoints on lines of code that don't actually do anything (unless you're talking about release mode, in which case I have no idea since alignment is probably not a big issue)&lt;br&gt;12) I'm always saying &amp;quot;int&amp;quot; to &amp;quot;IntPtr&amp;quot;, but that problem will only show up on 64-bit machines (too many people adapt the old VB6 API calls, which is WRONG WRONG WRONG since VB6 was 32-bit).</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589569</link><pubDate>Thu, 04 May 2006 04:52:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589569</guid><dc:creator>Matthew W. Jackson</dc:creator><description>Oh, and I believe that #13 is Safe-C, but I also think that Safe-C is now another project unrelated to C#.</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#589744</link><pubDate>Thu, 04 May 2006 11:02:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589744</guid><dc:creator>Stu Smith</dc:creator><description>12) Change the &amp;quot;long&amp;quot; to &amp;quot;int&amp;quot; (LONG is 4 bytes in Win32)</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#590486</link><pubDate>Fri, 05 May 2006 07:28:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590486</guid><dc:creator>dhananjay singh</dc:creator><description>2) Default constructor is not legal because in struct you can't do instance field initialization. So runtime need default constructor to initialize all instance fields to their default value.&lt;br&gt;	struct MyStrstrcut&lt;br&gt;	{&lt;br&gt;		int i=10 //illegal&lt;br&gt;	}&lt;br&gt;&lt;br&gt;7)C++ and C# nearly share all feature then why not just say &lt;br&gt;How java is sucking on exception ;)&lt;br&gt;&lt;br&gt;12) Change CALL to CALLVIRT in IL code.&lt;br&gt;</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#590487</link><pubDate>Fri, 05 May 2006 07:30:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590487</guid><dc:creator>dhananjay singh</dc:creator><description>Ahh I forget this one first one&lt;br&gt;1)because of its size it requir 2 read instruction for processor ;0)</description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#590489</link><pubDate>Fri, 05 May 2006 07:32:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590489</guid><dc:creator>dhananjay singh (dhananjay123@hotmail.com)</dc:creator><description>1)Decimal require 2 read instruction&lt;br&gt;2) Default constructor is not legal because in struct you can't do instance field initialization. So runtime need default constructor to initialize all instance fields to their default value. &lt;br&gt;struct MyStrstrcut &lt;br&gt;{ &lt;br&gt;int i=10 //illegal &lt;br&gt;} &lt;br&gt;&lt;br&gt;7)C++ and C# nearly share all feature then why not just say &lt;br&gt;How java is sucking on exception ;) &lt;br&gt;&lt;br&gt;12) Change CALL to CALLVIRT in IL code. </description></item><item><title>re: C# Trivia Test - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#590490</link><pubDate>Fri, 05 May 2006 07:32:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590490</guid><dc:creator>tp</dc:creator><description>tp</description></item><item><title>C# Trivia Test</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#591449</link><pubDate>Sat, 06 May 2006 15:27:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:591449</guid><dc:creator>Sheva</dc:creator><description>TrackBack From:&lt;a rel="nofollow" target="_new" href="http://sheva.cnblogs.com/archive/2006/05/06/392802.html"&gt;http://sheva.cnblogs.com/archive/2006/05/06/392802.html&lt;/a&gt;</description></item><item><title>C# Trivia Test</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#591825</link><pubDate>Sun, 07 May 2006 12:50:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:591825</guid><dc:creator>Sheva</dc:creator><description>TrackBack From:&lt;a rel="nofollow" target="_new" href="http://sheva.cnblogs.com/archive/0001/01/01/392802.html"&gt;http://sheva.cnblogs.com/archive/0001/01/01/392802.html&lt;/a&gt;</description></item><item><title>C# Trivia Test Answers - Part 11</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#592766</link><pubDate>Tue, 09 May 2006 02:01:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:592766</guid><dc:creator>Eric Gunnerson's C# Compendium</dc:creator><description>C# Trivia Test - Part 11 &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;(My initial set of responses vanished into the bit bucket due to the...</description></item><item><title> Eric Gunnerson s C Compendium C Trivia Test Part 11 | Green Tea Fat Burner</title><link>http://blogs.msdn.com/ericgu/archive/2006/05/03/589203.aspx#9741286</link><pubDate>Sat, 13 Jun 2009 05:15:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9741286</guid><dc:creator> Eric Gunnerson s C Compendium C Trivia Test Part 11 | Green Tea Fat Burner</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://greenteafatburner.info/story.php?id=3975"&gt;http://greenteafatburner.info/story.php?id=3975&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>