Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>CoVariance/ContraVariance</strong></p> <p>For CoVariance/ContraVariance they were perhaps thinking of the example of Arrays (or in general of R/W CoVariant objects)</p> <pre><code>class A { } class B : A { } static void Func(A[] a) { a[0] = new A(); } B[] b = new B[5]; Func(b); </code></pre> <p>This is "legal" to write, but it will throw on the assignment (in the Func) (ArrayTypeMismatchException). Here the CoVariant caused a problem. From the POV of Func it's "strange". I'll say that ContraVariance is a "missing" corollary of ReadWrite CoVariance (it should be there, but clearly it's impossible to do it)</p> <p><strong>For the GC</strong></p> <p><a href="http://architecturebyashwani.blogspot.com/2010/02/foreground-gc-and-background-gc.html" rel="nofollow">http://architecturebyashwani.blogspot.com/2010/02/foreground-gc-and-background-gc.html</a></p> <p>It SEEMS that Workstation GC always happens in the thread that allocates the memory, so there isn't any "extra" thread for the GC. I'll add that this is version-dependant, so it could change from version to version of .NET (and Mono does it differently). With Server GC you have specialized threads for GC, one for each processor. The I7 Quad Core of the example probably has HT (HyperThreading), so 8 "cores", so 8 threads.</p> <p><strong>Generation Size</strong></p> <p>For the size of the generations... I would say that "normally" the Gen2 is larger, because large objects are always Gen2 ( <a href="http://msdn.microsoft.com/en-us/magazine/cc534993.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/magazine/cc534993.aspx</a> ) (technically they aren't Gen2... They live in a separate space that is checked when Gen2 is checked, but we will ignore this... the question wasn't very clear, and it is implementation-defined and opaque enough that we don't know EXACTLY how the Gens are "LinkedListed" in memory), and long lived objects will go to Gen2 (so after the "startup" phase of your program, the singletons and other long-lived objects are all in Gen2)</p> <p>BUT ... in general this isn't true.</p> <p>Let's say you make a program that does a single allocation (<code>var obj = new object()</code>). That allocation will start at Gen0. When that object is allocated, there is a single object, and that object is Gen0, so technically Gen0 is the biggest one.</p> <p><strong>DTC</strong></p> <p>IBM DB2 supports the DTC, and so Oracle: </p> <ul> <li><p><a href="http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleconnection.enlistdistributedtransaction.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleconnection.enlistdistributedtransaction.aspx</a></p></li> <li><p><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.dbclient.adonet.ref.doc/doc/DB2ConnectionClassEnlistDistributedTransactionMethod.html" rel="nofollow">http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.dbclient.adonet.ref.doc/doc/DB2ConnectionClassEnlistDistributedTransactionMethod.html</a></p></li> </ul> <p>It's semi-tautological, but I would say that EnlistDistributedTransaction is not supported by</p> <ul> <li>DB that don't support transactions (some MySql, depending on the type of the base DB)</li> <li>DB that don't support a transaction monitor/transaction coordinator, but from what I've read, newer MySql, using base DB that support transactions, seems to be able to support DTC (for example read <a href="http://dev.mysql.com/doc/refman/5.0/en/xa.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/xa.html</a> )</li> </ul> <p><strong>&lt;codeBase&gt; Element</strong></p> <p>Written THIS way it's much more clearer</p> <p><a href="http://msdn.microsoft.com/en-us/library/efs781xb.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/efs781xb.aspx</a></p> <p>You can force your app to run with a particular version of a referenced assembly. Useful if there are "breaking changes" between versions of an assembly.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload