<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>CLS</title>
        <link>http://blogs.ugidotnet.org/Adrian/category/CLS.aspx</link>
        <description>CLS</description>
        <language>it-IT</language>
        <copyright>Adrian Florea</copyright>
        <generator>Subtext Version 2.6.0.0</generator>
        <item>
            <title>Implementare un'interfaccia non conforme al CLS con una classe conforme al CLS</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2005/07/27/24382.aspx</link>
            <description>&lt;P&gt;Per tantissimi sar&amp;#224; ovvia ma la posto brevemente, solo come osservazione: implementare un'interfaccia &lt;I&gt;non conforme&lt;/I&gt; al CLS con una classe &lt;I&gt;conforme&lt;/I&gt; al CLS &amp;#232; possibile implementando &lt;I&gt;esplicitamente&lt;/I&gt; i membri non conformi.&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/24382.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2005/07/27/24382.aspx</guid>
            <pubDate>Wed, 27 Jul 2005 10:06:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2005/07/27/24382.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/24382.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/24382.aspx</trackback:ping>
        </item>
        <item>
            <title>Quando lo stack overflow diventa sport e C# e J# concorrenti</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2005/07/12/23259.aspx</link>
            <description>&lt;P&gt;Questo codice, assolutamente simmetrico, l'ho scritto apposta per essere compilato sia in C# che in J#, senza modifiche:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;// foo.txt&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; &lt;SPAN style="COLOR: teal"&gt;Test&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; i = 0;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// J# entry point&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// vjc foo.txt&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; main(System.&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;[] args)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(i);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Main(args);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// C# entry point&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// csc foo.txt&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Main(System.&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;[] args)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(i);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main(args);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;Eseguendo il &lt;B&gt;foo.exe&lt;/B&gt;, arriva la &lt;B&gt;&lt;FONT color=#ff0000&gt;sorpresa&lt;/FONT&gt;&lt;/B&gt;: il numero di cicli che la variante J# riesce a fare (&lt;FONT color=#ff0000&gt;&lt;B&gt;159830&lt;/B&gt;&lt;/FONT&gt;), supera il numero di cicli della variante C# (&lt;FONT color=#ff0000&gt;&lt;B&gt;159781&lt;/B&gt;&lt;/FONT&gt;), fino al messaggio:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ffffff&gt;&lt;B&gt;&lt;SPAN style="BACKGROUND-COLOR: #000000"&gt;Process is terminated due to StackOverflowException.&lt;/SPAN&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Incuriosito da questa strana vittoria del J# :-) ho guardato il codice IL generato. Quando compiliamo con C#, il codice IL per i corpi dei metodi &lt;B&gt;main&lt;/B&gt; e &lt;B&gt;Main&lt;/B&gt; &amp;#232; identico. Quando compiliamo con J# invece, il corpo dell'entry point, &lt;B&gt;main&lt;/B&gt;, &amp;#232; quello di &lt;STRONG&gt;Main&lt;/STRONG&gt; inquadrato da:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;ldtoken &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;[vjslib]&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;com.ms.vjsharp.lang.ObjectImpl&lt;/SPAN&gt;&lt;BR&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;call &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: darkcyan; FONT-FAMILY: 'Courier New'"&gt;void &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;[mscorlib]&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;System.Runtime.CompilerServices.RuntimeHelpers::&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: midnightblue; FONT-FAMILY: 'Courier New'"&gt;RunClassConstructor&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: darkgreen; FONT-FAMILY: 'Courier New'"&gt;(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;valuetype &lt;B&gt;[mscorlib]&lt;/B&gt;System.RuntimeTypeHandle&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: darkgreen; FONT-FAMILY: 'Courier New'"&gt;)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=IT style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;// qui il corpo del Main...&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;all'inizio e:&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=IT style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;// qui il corpo del Main...&lt;/SPAN&gt;&lt;BR&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;call &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: darkcyan; FONT-FAMILY: 'Courier New'"&gt;void &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;[vjslib]&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;com.ms.vjsharp.util.Utilities::&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: midnightblue; FONT-FAMILY: 'Courier New'"&gt;cleanupAfterMainReturns&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: darkgreen; FONT-FAMILY: 'Courier New'"&gt;()&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;alla fine. &lt;/P&gt;
&lt;P&gt;Cos'ho provato a fare allora? Ho aggiunto nel metodo &lt;B&gt;Main&lt;/B&gt;, cio&amp;#232; nell'entry point&amp;nbsp;di C# seguendo il modello dell'entry point&amp;nbsp;di J#, l'equivalente (C# e J#) di questi due pezzi in IL. Lo snippet &amp;#232; risultato cos&amp;#236;:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;// foo.txt&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; &lt;SPAN style="COLOR: teal"&gt;Test&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; i = 0;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// J# entry point&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// vjc foo.txt&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; main(System.&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;[] args)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(i);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Main(args);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// C# entry point&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: green"&gt;// csc &lt;/SPAN&gt;&lt;FONT color=#ff0000&gt;&lt;B&gt;/r:vjslib.dll&lt;/B&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: green"&gt; foo.txt&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; Main(System.&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;[] args)&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;B&gt;&lt;FONT color=#ff0000&gt;System.Runtime.CompilerServices.&lt;/FONT&gt;&lt;SPAN style="COLOR: #ff0000"&gt;RuntimeHelpers&lt;/SPAN&gt;&lt;FONT color=#ff0000&gt;.RunClassConstructor(&lt;/FONT&gt;&lt;SPAN style="COLOR: #ff0000"&gt;typeof&lt;/SPAN&gt;&lt;FONT color=#ff0000&gt;(com.ms.vjsharp.lang.ObjectImpl).TypeHandle);&lt;/FONT&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;SPAN style="COLOR: teal"&gt;Console&lt;/SPAN&gt;.WriteLine(i);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main(args);&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;&lt;B&gt;com.ms.vjsharp.util.Utilities.cleanupAfterMainReturns();&lt;/B&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;Ricompilando adesso in C# e in J# e rieseguendo &lt;STRONG&gt;foo&lt;/STRONG&gt;, otteniamo &lt;U&gt;lo stesso numero di cicli&lt;/U&gt;: &lt;FONT color=#ff0000&gt;&lt;B&gt;159830&lt;/B&gt;&lt;/FONT&gt;! &lt;/P&gt;
&lt;P&gt;Si vede per&amp;#242; come &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemruntimecompilerservicesruntimehelpersclassrunclassconstructortopic.asp"&gt;RunClassConstructor&lt;/A&gt; mangia un po' di stack. Se lo togliamo via lasciando solo &lt;B&gt;cleanupAfterMainReturns&lt;/B&gt;, otteniamo addiritura un incremento del numero di cicli nella variante C#: &lt;FONT color=#ff0000&gt;&lt;B&gt;159914&lt;/B&gt;&lt;/FONT&gt;! Dal suo nome sembra che veramente faccia qualche &lt;B&gt;clean up after main returns&lt;/B&gt;... :-) Eppure si trova dopo la chiamata di &lt;B&gt;main&lt;/B&gt;...&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/23259.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2005/07/12/23259.aspx</guid>
            <pubDate>Tue, 12 Jul 2005 21:13:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2005/07/12/23259.aspx#feedback</comments>
            <slash:comments>8</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/23259.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/23259.aspx</trackback:ping>
        </item>
        <item>
            <title>toString or not ToString</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2005/03/18/12634.aspx</link>
            <description>&lt;P&gt;Avere in un linguaggio .NET un metodo pubblico, non statico, conforme al CLS e di una classe pubblica, in un assembly, non necessariamente vuol dire che possa essere richiamato da un altro assembly!&lt;/P&gt;
&lt;P&gt;L'esempio non &amp;#232; evidente: il metodo &lt;B&gt;&lt;FONT color=#ff0000&gt;toString&lt;/FONT&gt;&lt;/B&gt; in questo snippet J#:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; A &lt;FONT color=#0000ff&gt;extends&lt;/FONT&gt; java.lang.Object&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; String &lt;FONT color=#ff0000&gt;&lt;B&gt;toString&lt;/B&gt;&lt;/FONT&gt;()&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; "A::toString";&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;} &lt;/P&gt;
&lt;P&gt;non pu&amp;#242; essere richiamato da C#:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; Test&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void&lt;/FONT&gt; Main()&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// error CS0117: 'A' does not contain a definition for 'toString' &lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine(&lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; A().&lt;FONT color=#ff0000&gt;&lt;B&gt;toString&lt;/B&gt;&lt;/FONT&gt;());&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;} &lt;/P&gt;
&lt;P&gt;se non lo sostituiamo con &lt;B&gt;ToString&lt;/B&gt;. Da VisualBasic .NET invece, va ("&lt;I&gt;identifiers are case insensitive&lt;/I&gt;"):&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt; Test&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; Main()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;' OK&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine(&lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; A().&lt;FONT color=#ff0000&gt;&lt;B&gt;toString&lt;/B&gt;&lt;/FONT&gt;())&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;BR&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;E questo perch&amp;#233;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;"&lt;I&gt;In Visual J#, &lt;/I&gt;&lt;B&gt;java.lang.Object&lt;/B&gt;&lt;I&gt; is treated as a language-specific root of the object hierarchy. The means to access this object from languages supported by the common language runtime is through &lt;/I&gt;&lt;B&gt;System.Object&lt;/B&gt;&lt;I&gt;. Thus, such languages do not see Visual J# objects as special objects deriving from &lt;/I&gt;&lt;B&gt;java.lang.Object&lt;/B&gt;&lt;I&gt;.&lt;/I&gt;" (&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vjsharp/html/vjlrfobjecthierarchysemantics.asp"&gt;Object Hierarchy Semantics&lt;/A&gt;)&lt;/BLOCKQUOTE&gt;
&lt;P&gt;e quindi il compilatore Visual J# "sostituisce" &lt;B&gt;java.lang.Object&lt;/B&gt; con &lt;B&gt;System.Object&lt;/B&gt; e &lt;B&gt;&lt;FONT color=#ff0000&gt;toString&lt;/FONT&gt;&lt;/B&gt; con &lt;B&gt;ToString&lt;/B&gt;.&lt;/P&gt;
&lt;P&gt;Non so i compilatori .NET per gli altri linguaggi che hanno una superclasse di tutte le altre classi come la considerano - per esempio in &lt;A href="http://scala.epfl.ch/"&gt;Scala&lt;/A&gt; esiste una superclasse di tutte le classi, &lt;A href="http://scala.epfl.ch/intro/unifiedtypes.html"&gt;scala.Any&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/12634.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2005/03/18/12634.aspx</guid>
            <pubDate>Fri, 18 Mar 2005 17:27:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2005/03/18/12634.aspx#feedback</comments>
            <slash:comments>11</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/12634.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/12634.aspx</trackback:ping>
        </item>
        <item>
            <title>CLS anche a Bucarest</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2005/03/10/12126.aspx</link>
            <description>&lt;P&gt;Il 23 di marzo, cio&amp;#232; tra meno di due settimane, presenter&amp;#242; una sessione al workshop &lt;A href="http://www.aurelian.ro/ronua/"&gt;RONUA&lt;/A&gt; (&lt;B&gt;RO&lt;/B&gt;manian .&lt;B&gt;N&lt;/B&gt;ET &lt;B&gt;U&lt;/B&gt;ser &lt;B&gt;A&lt;/B&gt;ssociation) a Bucarest, alla sede di &lt;A href="http://www.microsoft.com/romania/"&gt;Microsoft Romania&lt;/A&gt; (grazie a &lt;A href="http://www.microsoft.com/communities/mvp/mvpdetails.mspx?Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22guid%22+Value%3d%22c67d338b-8a7c-4a00-b03b-f3679f1c48a2%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e"&gt;Aurelian Popa&lt;/A&gt; per questo invito che mi onora). L'argomento sar&amp;#224; sempre CLS per&amp;#242; il contenuto e la struttura rifatti completamente rispetto alla &lt;A href="http://www2.ugidotnet.org/downloads/workshop/20041202/CLS/CLS.ppt"&gt;sessione presentata a dicembre&lt;/A&gt;, a Milano.&lt;/P&gt;
&lt;P&gt;RONUA, da quando &lt;A href="http://blogs.ugidotnet.org/adrian/archive/2004/10/31/5028.aspx"&gt;ve l'ho presentato&lt;/A&gt; l'autunno scorso, ha fatto delle belle cose: &lt;A href="http://www.ineta.org/desktopdefault.aspx?tabindex=1&amp;amp;tabid=27&amp;amp;groupid=1522"&gt;membro INETA&lt;/A&gt;, 5 workshop a Bucarest (questo del 23 sar&amp;#224; il sesto e al quarto sono venuti &lt;A href="http://blogs.ugidotnet.org/adrian/admin/(http:/blogs.msdn.com/jasonz"&gt;Jason Zander&lt;/A&gt; e Brandon Bynum) e 2 a Timisoara, 122 membri e ultimamente degli ottimi post sul &lt;A href="http://www.aurelian.ro/RONUA/Forum/"&gt;forum&lt;/A&gt;. Per il suo primo mezzo anno di vita mi sembra tanto! Se avete qualche idea di collaborazione UGIdotNET-RONUA (cene comprese) vi prego di &lt;A href="http://blogs.ugidotnet.org/adrian/contact.aspx"&gt;contattarmi&lt;/A&gt; appena vi vengono :-)&lt;/P&gt;
&lt;P&gt;I versi del giorno: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;Tutte le citt&amp;#224; del mondo&lt;BR&gt;oasi delle nostre noie affamate&lt;BR&gt;offrono bevande fresche&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Philippe Soupault - Westwego (1917-1922)&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/12126.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2005/03/10/12126.aspx</guid>
            <pubDate>Thu, 10 Mar 2005 13:47:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2005/03/10/12126.aspx#feedback</comments>
            <slash:comments>24</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/12126.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/12126.aspx</trackback:ping>
        </item>
        <item>
            <title>Quiz Sharp #41</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2004/12/08/6765.aspx</link>
            <description>&lt;P&gt;Chi ha seguito la mia sessione al workshop del 2 dicembre gi&amp;#224; lo conosce. Per gli altri, qui sotto, una domandina:&lt;/P&gt;
&lt;P&gt;Cosa producono i seguenti due pezzi di codice?&lt;/P&gt;
&lt;TABLE width="100%" border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD align=middle width="50%"&gt;&lt;B&gt;C#&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="50%"&gt;&lt;B&gt;Visual Basic .NET&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;[IndexerName("P")] &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;public&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt; &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;[&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; i]&lt;/SPAN&gt; &lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;{ &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;get &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; _p[i]; &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;set &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;_p[i] = &lt;SPAN style="COLOR: blue"&gt;value&lt;/SPAN&gt;; &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;lt;IndexerName("P")&amp;gt; _ &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;Public&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; Item(&lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; i &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Integer&lt;/SPAN&gt;) &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;String &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Get &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Return&lt;/SPAN&gt; _p(i) &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Get &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Set&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; Value &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Integer&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;_p(i) = Value &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Set &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;End&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/6765.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2004/12/08/6765.aspx</guid>
            <pubDate>Wed, 08 Dec 2004 20:00:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2004/12/08/6765.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/6765.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/6765.aspx</trackback:ping>
        </item>
        <item>
            <title>Consumare da C# codice Delphi non-CLS</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2004/11/30/6340.aspx</link>
            <description>&lt;P&gt;Abbiamo visto nel &lt;A href="http://blogs.ugidotnet.org/adrian/archive/2004/11/29/6326.aspx"&gt;post precedente&lt;/A&gt; come il compilatore Delphi crea una classe finta per ogni &lt;B&gt;unit&lt;/B&gt; cos&amp;#236; che anche il codice procedurale soddisfi la &lt;B&gt;regola CLS 36&lt;/B&gt;. Cosa succede invece quando non gli lasciamo pi&amp;#249; spazio agli trucchi e trasgrediamo in modo esplicito una regola CLS, per esempio la &lt;B&gt;CLS Rule 11&lt;/B&gt; (quella sulla &lt;EM&gt;signature&lt;/EM&gt;)? Potremmo da C# "consumare" un codice come quello di seguito? (al tipo &lt;I&gt;Word&lt;/I&gt; di Delphi corrisponde in C# il tipo &lt;STRONG&gt;ushort&lt;/STRONG&gt;, non CLS)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;// DelphiCls.pas&lt;BR&gt;&lt;B&gt;library&lt;/B&gt; DelphiCls;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;uses&lt;/B&gt;&lt;BR&gt;Foo &lt;B&gt;in&lt;/B&gt; 'Foo.pas';&lt;BR&gt;&lt;BR&gt;// inutile: Delphi non &amp;#232; CLS-compliant&lt;BR&gt;[assembly: CLSCompliant(True)]&lt;BR&gt;&lt;BR&gt;&lt;B&gt;begin&lt;/B&gt;&lt;BR&gt;&lt;B&gt;end&lt;/B&gt;.
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Foo.pas&lt;BR&gt;&lt;B&gt;unit&lt;/B&gt; Foo;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;interface&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;// non ha una signature conforme al CLS&lt;BR&gt;&lt;B&gt;function&lt;/B&gt; BadArgType(i: Word): Word;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;implementation&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;function&lt;/B&gt; BadArgType(i: Word): Word;&lt;BR&gt;&lt;B&gt;begin&lt;/B&gt;&lt;BR&gt;&amp;nbsp; Result := i + 1;&lt;BR&gt;&lt;B&gt;end&lt;/B&gt;;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;end&lt;/B&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;La risposta &amp;#232; s&amp;#236;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#008000&gt;// C#&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System;&lt;BR&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; Test&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void&lt;/FONT&gt; Main()&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;ushort&lt;/FONT&gt; i = 2;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(Foo.Units.Foo.BadArgType(i)); &lt;FONT color=#008000&gt;// scrive 3&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Read();&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;} &lt;/BLOCKQUOTE&gt;
&lt;P&gt;Qualcuno sa perch&amp;#233;, prima che arrivi &lt;A href="http://www.microsoft.com/italy/eventi/msdn/wkArchitecture.mspx"&gt;il gioved&amp;#236;&lt;/A&gt;?&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/6340.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2004/11/30/6340.aspx</guid>
            <pubDate>Tue, 30 Nov 2004 01:27:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2004/11/30/6340.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/6340.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/6340.aspx</trackback:ping>
        </item>
        <item>
            <title>Gli errori C# relativi esplicitamente al CLS</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2004/11/29/6277.aspx</link>
            <description>&lt;P&gt;Nel file "&lt;A href="http://dotnet.di.unipi.it/Content/sscli/docs/doxygen/csharp/alink_2inc_2errors_8h-source.html"&gt;errors.h&lt;/A&gt;" che contiene la lista di tutti gli errori e warning del compilatore C# del &lt;A href="http://msdn.microsoft.com/net/sscli"&gt;Rotor&lt;/A&gt; c'&amp;#232; scritto che "&lt;I&gt;Range 3000-3999 is reserved for CLS errors&lt;/I&gt;". Qui sotto nella tabella, ho mappato &lt;SPAN style="BACKGROUND-COLOR: #ffcc66"&gt;gli errori C# riguardanti &lt;I&gt;esplicitamente&lt;/I&gt; il CLS&lt;/SPAN&gt; alle &lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;regole del CLS trasgredite&lt;/SPAN&gt;:&lt;/P&gt;
&lt;TABLE width="100%" border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%" bgColor=#000000&gt;&lt;FONT color=#ffffff&gt;&lt;B&gt;Visual C# Compiler Error / Warning Number&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%" bgColor=#000000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;Rotor Error Name&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="47%" bgColor=#000000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;Summary&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="28%" bgColor=#ffcc66&gt;&lt;B&gt;Description&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="23%" bgColor=#000000&gt;&lt;FONT color=#ffffff&gt;&lt;B&gt;CLS Rule Number&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%" bgColor=#ccff99&gt;&lt;B&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;CLS Rule&lt;/SPAN&gt;&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;?&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;NoVarArgs&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="47%"&gt;?&lt;/TD&gt;
&lt;TD align=middle width="28%" bgColor=#ffcc66&gt;?&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;?&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;&lt;B&gt;?&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerWarningLevel1SC3001.asp"&gt;CS3001&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadArgType&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Argument type '&lt;I&gt;type&lt;/I&gt;' is not CLS-compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected&lt;/B&gt; &lt;B&gt;internal&lt;/B&gt; method must accept a parameter whose type is compliant with the CLS.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;11&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="51%"&gt;&lt;B&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;All types appearing in a signature shall be CLS-compliant.&lt;/SPAN&gt;&lt;/B&gt; (p. 49 del PDF)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerWarningLevel1SC3002.asp"&gt;CS3002&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadReturnType&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Return type of '&lt;I&gt;method&lt;/I&gt;' is not CLS-compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected internal&lt;/B&gt; method must return a value whose type is compliant with the CLS.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;11&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;(vedi sopra)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerWarningLevel1SC3003.asp"&gt;CS3003&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadFieldPropType&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Type of '&lt;I&gt;variable&lt;/I&gt;' is not CLS-compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected internal&lt;/B&gt; variable must be of a type that is compliant with the CLS.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;11, 27&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;(vedi sopra per &lt;B&gt;11&lt;/B&gt;) 
&lt;P align=left&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;&lt;B&gt;[The type of a property] shall be CLS-compliant, and shall not be managed pointers (i.e. shall not be passed by reference).&lt;/B&gt;&lt;/SPAN&gt; (p. 64 del PDF)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerWarningLevel1SC3004.asp"&gt;CS3004&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadUnicode&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Mixed and decomposed Unicode characters are not CLS-compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;Only composed Unicode characters are allowed in &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected internal&lt;/B&gt; identifiers in order to be compliant with the CLS.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;4&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="51%"&gt;&lt;B&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;Assemblies shall follow &lt;I&gt;Annex 7&lt;/I&gt; of &lt;A href="http://www.unicode.org/unicode/reports/tr15/tr15-18.html"&gt;Technical Report 15&lt;/A&gt; of the &lt;I&gt;Unicode Standard 3.0&lt;/I&gt; (ISBN 0-201-61633-5) governing the set of characters permitted to start and be included in identifiers. Identifiers shall be in the canonical format defined by &lt;I&gt;Unicode Normalization Form C&lt;/I&gt;. For CLS purposes, two identifiers are the same if their lowercase mappings (as specified by the Unicode locale-insensitive, 1-1 lowercase mappings) are the same. That is, for two identifiers to be considered different under the CLS they shall differ in more than simply their case. However, in order to override an inherited definition the CLI requires the precise encoding of the original declaration be used.&lt;/SPAN&gt;&lt;/B&gt; (p. 44 del PDF)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerWarningLevel1SC3005.asp"&gt;CS3005&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadIdentifierCase&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Identifier '&lt;I&gt;identifier&lt;/I&gt;' differing only in case is not CLS-compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected internal&lt;/B&gt; identifier, which differs from another &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected internal&lt;/B&gt; identifier only in the case of one or more letters, is not compliant with the CLS.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;4&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;(vedi sopra)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorCS3006.asp"&gt;CS3006&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;OverloadRefOut&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Overloaded method '&lt;I&gt;method&lt;/I&gt;' differing only in &lt;B&gt;ref&lt;/B&gt; or &lt;B&gt;out&lt;/B&gt; is not CLS-compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A method does not cannot be overloaded based on the &lt;B&gt;ref&lt;/B&gt; or &lt;B&gt;out&lt;/B&gt; parameter and still comply with the CLS.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;38&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="51%"&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;&lt;B&gt;Properties, instance methods, and virtual methods may be overloaded based only on the number and types of their parameters, except the conversion operators named &lt;/B&gt;op_Implicit&lt;B&gt; and &lt;/B&gt;op_Explicit&lt;B&gt; which may also be overloaded based on their return type.&lt;/B&gt;&lt;/SPAN&gt; (p. 72 del PDF)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerWarningLevel1SC3008.asp"&gt;CS3008&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadIdentifier&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Identifier '&lt;I&gt;identifier&lt;/I&gt;' is not CLS-compliant.&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A &lt;B&gt;public&lt;/B&gt;, &lt;B&gt;protected&lt;/B&gt;, or &lt;B&gt;protected internal&lt;/B&gt; identifier breaks compliance with the CLS if it begins with an underscore character "_".&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;4&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;(vedi sopra) 
&lt;P&gt;da vedere anche il mio &lt;A href="http://blogs.ugidotnet.org/adrian/archive/2004/11/28/6269.aspx"&gt;post precedente&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3009.asp"&gt;CS3009&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadBase&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;'&lt;I&gt;type&lt;/I&gt;': base type '&lt;I&gt;type&lt;/I&gt;' is not CLS-compliant.&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A base type was marked as not having to be compliant with the CLS in a module that was marked as being CLS compliant. Either remove the attribute that specifies the module is CLS compliant or remove the attribute that indicates the type is not CLS compliant.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;?&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;&lt;B&gt;?&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3010.asp"&gt;CS3010&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadInterfaceMember&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;'&lt;I&gt;member&lt;/I&gt;': CLS-compliant interfaces must have CLS-compliant members&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;In a module marked with &lt;I&gt;[assembly:CLCSompliant(&lt;B&gt;true&lt;/B&gt;)]&lt;/I&gt;, an interface contains a member marked with &lt;I&gt;[CLCSompliant(&lt;B&gt;false&lt;/B&gt;)]&lt;/I&gt;. Remove one of the CLS compliance attributes.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;18&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="51%"&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;&lt;B&gt;CLS-compliant interfaces shall not require the definition of non-CLS compliant methods in order to implement them.&lt;/B&gt;&lt;/SPAN&gt; (p. 55 del PDF)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3011.asp"&gt;CS3011&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;NoAbstractMembers&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;'&lt;I&gt;member&lt;/I&gt;': only CLS-compliant members can be abstract&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A class member cannot be both &lt;B&gt;abstract&lt;/B&gt; and non-compliant with the CLS. The CLS specifies that all class members shall be implemented.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;?&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;&lt;B&gt;?&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3012.asp"&gt;CS3012&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_&lt;FONT color=#ff0000&gt;WRN&lt;/FONT&gt;_&lt;B&gt;NotOnModules&lt;/B&gt;&lt;BR&gt;Compiler &lt;FONT color=#ff0000&gt;Warning&lt;/FONT&gt; (level 1)&lt;/TD&gt;
&lt;TD width="47%"&gt;You must specify the &lt;I&gt;CLSCompliant&lt;/I&gt; attribute on the assembly.&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;In order for a module to be compliant with the CLS through &lt;I&gt;[module:System.CLCSompliant(&lt;B&gt;true&lt;/B&gt;)]&lt;/I&gt;, it must be built with the &lt;B&gt;/target:module&lt;/B&gt; compiler option.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;-&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;-&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3013.asp"&gt;CS3013&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;ModuleMissingCLS&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Added module is not CLS-compliant, or is missing CLSCompliant attribute.&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;A module that was compiled with the &lt;B&gt;/target:module&lt;/B&gt; compiler option was added to a compilation with &lt;B&gt;/addmodule&lt;/B&gt;. However, the module's compliance with the CLS does not agree with the CLS state of the current compilation. 
&lt;P&gt;CLS compliance is indicated with the module attribute. For example, &lt;I&gt;[module:CLSCompliant(&lt;B&gt;true&lt;/B&gt;)]&lt;/I&gt; indicates that the module is CLS compliant, and &lt;I&gt;[module:CLSCompliant(&lt;B&gt;false&lt;/B&gt;)]&lt;/I&gt; indicates that the module is not CLS compliant. The default is &lt;I&gt;[module:CLSCompliant(&lt;B&gt;false&lt;/B&gt;)]&lt;/I&gt;.&lt;/P&gt;&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;- &lt;/TD&gt;
&lt;TD width="51%"&gt;
&lt;P align=center&gt;-&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorCS3014.asp"&gt;CS3014&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;AssemblyNotCLS&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;'&lt;I&gt;member&lt;/I&gt;' cannot be marked as CLS compliant because the assembly is not marked as compliant&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;In a source code file where compliance with the CLS was declined, a construct in the file was marked as being CLS compliant. This is not allowed. Remove one of the &lt;I&gt;CLSCompliant&lt;/I&gt; specifications.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;2&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="51%"&gt;&lt;B&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;Members of non-CLS compliant types shall not be marked CLS-compliant.&lt;/SPAN&gt;&lt;/B&gt; (p. 36 del PDF)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorCS3015.asp"&gt;CS3015&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;BadAttributeType&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;'&lt;I&gt;method signature&lt;/I&gt;' has no accessible constructors which use only CLS compliant types.&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;To be compliant with the CLS, the argument list of an attribute class cannot contain an array.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;34&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="51%"&gt;&lt;SPAN style="BACKGROUND-COLOR: #ccff99"&gt;&lt;B&gt;The CLS only allows a subset of the encodings of custom attributes. The only types that shall appear in these encodings are: &lt;/B&gt;System.Type&lt;B&gt;, &lt;/B&gt;System.String&lt;B&gt;, &lt;/B&gt;System.Char&lt;B&gt;, &lt;/B&gt;System.Boolean&lt;B&gt;, &lt;/B&gt;System.Byte&lt;B&gt;, &lt;/B&gt;System.Int16&lt;B&gt;, &lt;/B&gt;System.Int32&lt;B&gt;, &lt;/B&gt;System.Int64&lt;B&gt;, &lt;/B&gt;System.Single&lt;B&gt;, &lt;/B&gt;System.Double&lt;B&gt;, and any enumeration type based on a CLS-compliant base integer type.&lt;/B&gt;&lt;/SPAN&gt; (p. 69 del PDF)&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align=middle width="21%"&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorCS3016.asp"&gt;CS3016&lt;/A&gt;&lt;/TD&gt;
&lt;TD align=middle width="32%"&gt;ERR_CLS_&lt;B&gt;ArrayArgumentToAttribute&lt;/B&gt;&lt;/TD&gt;
&lt;TD width="47%"&gt;Arrays as attribute arguments is not CLS-compliant.&lt;/TD&gt;
&lt;TD width="28%" bgColor=#ffcc66&gt;It is not compliant with the CLS to pass an array to an attribute.&lt;/TD&gt;
&lt;TD align=middle width="23%"&gt;&lt;B&gt;34&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=middle width="51%"&gt;(vedi sopra)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;E' interessante notare che il warning &lt;A href="http://blogs.ugidotnet.org/adrian/admin/msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3012.asp"&gt;CS3012&lt;/A&gt;, l'unico warning in questa serie composta solo da errori di non conformit&amp;#224; al CLS, riguarda non il linguaggio ma le opzioni di compilazione che devono essere coerenti con il codice. All'inizio mi sono chiesto: ma sar&amp;#224; per questo che i tizi del Visual C# Team l'hanno scelto come warning e non come errore? Poi, ho visto anche la situazione simile dell'errore &lt;A href="http://blogs.ugidotnet.org/adrian/admin/msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3013.asp"&gt;CS3013&lt;/A&gt;, che non &amp;#232; warning ma errore e quindi il ragionamento forse non vale. Sono stato un po' indeciso tra mettere un punto di domanda e mettere un trattino per questi due, ma alla fine ho scelto il trattino.&lt;/P&gt;
&lt;P&gt;Un'altra osservazione &amp;#232; che il compilatore C# del Rotor sembra avere un errore in pi&amp;#249; per il CLS, ERR_CLS_&lt;B&gt;NoVarArgs&lt;/B&gt;, molto probabilmente riguardante la &lt;B&gt;CLS Rule 15&lt;/B&gt;: "&lt;I&gt;The &lt;/I&gt;&lt;B&gt;varargs&lt;/B&gt;&lt;I&gt; constraint is not part of the CLS, and the only calling convention supported by the CLS is the standard managed calling convention.&lt;/I&gt;" (p. 51 del PDF). Ho lasciato per&amp;#242; un punto di domanda.&lt;/P&gt;
&lt;P&gt;Non ho trovato una regola CLS corrispondente all'errore &lt;A href="http://blogs.ugidotnet.org/adrian/admin/msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3009.asp"&gt;CS3009&lt;/A&gt;, anche se sarei tentato al limite di associargli la &lt;B&gt;CLS Rule 20&lt;/B&gt;: "&lt;I&gt;CLS-compliant classes, value types, and interfaces shall not require the implementation of non-CLS-compliant interfaces.&lt;/I&gt;" (p. 58 del PDF). La regola per&amp;#242; si riferisce chiaramente a &lt;B&gt;interface&lt;/B&gt; non conforme al CLS.&lt;/P&gt;
&lt;P&gt;La stessa &lt;B&gt;CLS Rule 20&lt;/B&gt; l'associerei all'errore &lt;A href="http://blogs.ugidotnet.org/adrian/admin/msdn.microsoft.com/library/en-us/cscomp/html/vcerrCompilerErrorSC3011.asp"&gt;CS3011&lt;/A&gt; con la stessa osservazione.&lt;/P&gt;
&lt;P&gt;Qualche commento?&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/6277.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2004/11/29/6277.aspx</guid>
            <pubDate>Mon, 29 Nov 2004 01:19:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2004/11/29/6277.aspx#feedback</comments>
            <slash:comments>94</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/6277.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/6277.aspx</trackback:ping>
        </item>
        <item>
            <title>L'underscore e la CLS Rule 4</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2004/11/28/6269.aspx</link>
            <description>&lt;P&gt;Mi ha attirato l'attenzione un commento di &lt;A href="http://blogs.ugidotnet.org/mprota/"&gt;Massimo Prota&lt;/A&gt; a &lt;A href="http://blogs.ugidotnet.org/pierregreborio/archive/2004/11/25/6129.aspx"&gt;questo post&lt;/A&gt; di &lt;A href="http://blogs.ugidotnet.org/PierreGreborio/"&gt;Pierre&lt;/A&gt;. Beh, riguarda CLS, di cui vi parler&amp;#242; gioved&amp;#236; - a sala vuota mi sa... :-)&lt;/P&gt;
&lt;P&gt;Massimo segnalava in sostanza il fatto che in un assembly conforme al CLS non possiamo nominare gli identificatori dei campi protected con il prefisso "_" in una classe public.&lt;/P&gt;
&lt;P&gt;Ne approfitto per aggiungere delle cose magari meno conosciute:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Beccare tra le 41 regole del CLS quella responsabile di questo vincolo non &amp;#232; immediato. Dovreste leggervi l'appendice 7 "&lt;A href="http://www.unicode.org/unicode/reports/tr15/tr15-18.html#Programming%20Language%20Identifiers"&gt;Programming Language Identifiers&lt;/A&gt;" dell'"&lt;A href="http://www.unicode.org/unicode/reports/tr15/tr15-18.html"&gt;Unicode Technical Report #15&lt;/A&gt;" (come specificato dalla &lt;B&gt;CLS Rule 4&lt;/B&gt; - p. 44 del PDF del testo dello &lt;A href="http://www.ecma-international.org/publications/standards/Ecma-335.htm"&gt;standard ECMA-335&lt;/A&gt;). Per&amp;#242; l&amp;#236; non incontrerete alcun riferimento all'&lt;I&gt;underscore&lt;/I&gt;. Semplicemente, l'&lt;I&gt;underscore&lt;/I&gt; non si trova nell'elenco: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;"&lt;I&gt;the first character of an identifier can be an &lt;/I&gt;uppercase letter&lt;I&gt;, &lt;/I&gt;lowercase letter&lt;I&gt;, &lt;/I&gt;titlecase letter&lt;I&gt;, &lt;/I&gt;modifier letter&lt;I&gt;, &lt;/I&gt;other letter&lt;I&gt;, or &lt;/I&gt;letter number"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;che definisce l'elemento &lt;I&gt;&lt;IDENTIFIER_START&gt;&lt;/I&gt;. E se "_" non si trova, non &amp;#232; soddisfatta la regola 4 del CLS. 
&lt;LI&gt;Questo &amp;#232; un errore che d&amp;#224; il compilatore C# (l'errore &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscomp/html/vcerrcompilerwarninglevel1sc3008.asp"&gt;CS3008&lt;/A&gt;). Visual Basic non lo segnala come errore e possiamo tranquillamente avere: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;' Visual Basic .NET&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt;&lt;FONT size=+0&gt; System&lt;BR&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Assembly&lt;/FONT&gt;&lt;FONT size=+0&gt;: CLSCompliant(&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;True&lt;/FONT&gt;&lt;FONT size=+0&gt;)&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Namespace&lt;/FONT&gt;&lt;FONT size=+0&gt; VisualBasic&lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;FONT size=+0&gt; ClsRule4&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;' OK&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Protected&lt;/FONT&gt;&lt;FONT size=+0&gt; _underscorePrefixed &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;String&lt;BR&gt;&amp;nbsp; End &lt;/FONT&gt;&lt;FONT size=+0&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Class&lt;BR&gt;End&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Namespace &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;// Visual C# .NET&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;FONT size=+0&gt; System;&lt;BR&gt;[assembly:CLSCompliant(&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;&lt;FONT size=+0&gt;)]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;namespace&lt;/FONT&gt;&lt;FONT size=+0&gt; CSharp&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt;&lt;FONT size=+0&gt; ClsRule4: VisualBasic.ClsRule4&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;FONT size=+0&gt; Foo()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(_underscorePrefixed);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;} &lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;ma non il caso simmetrico:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT color=#008000&gt;// Visual C# .NET&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;FONT size=+0&gt; System;&lt;BR&gt;[assembly:CLSCompliant(&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;&lt;FONT size=+0&gt;)]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;namespace&lt;/FONT&gt;&lt;FONT size=+0&gt; CSharp&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt;&lt;FONT size=+0&gt; ClsRule4&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000&gt;// error CS3008: Identifier 'CSharp.ClsRule4._underscorePrefixed' is not CLS-compliant&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;protected&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT size=+0&gt; _underscorePrefixed;&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&lt;BR&gt;&lt;FONT color=#008000&gt;' Visual Basic .NET&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt;&lt;FONT size=+0&gt; System&lt;BR&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Assembly&lt;/FONT&gt;&lt;FONT size=+0&gt;: CLSCompliant(&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;True&lt;/FONT&gt;&lt;FONT size=+0&gt;)&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Namespace&lt;/FONT&gt;&lt;FONT size=+0&gt; VisualBasic&lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;FONT size=+0&gt; ClsRule4 : &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Inherits&lt;/FONT&gt;&lt;FONT size=+0&gt; CSharp.ClsRule4&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt;&lt;FONT size=+0&gt; Foo()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(_underscorePrefixed)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Sub&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=+0&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Class&lt;BR&gt;End&lt;/FONT&gt;&lt;FONT size=+0&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Namespace &lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;
&lt;LI&gt;Guardando nei sorgenti del &lt;A href="http://msdn.microsoft.com/net/sscli"&gt;Rotor&lt;/A&gt; sono arrivato al file "&lt;A href="http://dotnet.di.unipi.it/Content/sscli/docs/doxygen/csharp/clsdrec_8cpp-source.html"&gt;clsdrec.cpp&lt;/A&gt;" dove, all'interno della &lt;B&gt;CLSDREC::checkCLSnaming&lt;/B&gt; si nota la verifica non solo in base all'underscore (0x005F) ma anche al carattere (0xFF3F) che significa in Unicode "&lt;I&gt;FULLWIDTH LOW LINE&lt;/I&gt;". Se provate invece in Visual C# .NET a dichiarare un membro che inizi con \uff3f non vi d&amp;#224; errore di non conformit&amp;#224; al CLS ma: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;I&gt;Invalid token '' in class, struct, or interface member declaration&lt;BR&gt;Invalid token ';' in class, struct, or interface member declaration&lt;/I&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRIKE&gt;Massimo ha fatto anche un piccolo errore, sicuramente per la fretta del commento: ha incluso anche il &lt;I&gt;camelCase&lt;/I&gt; nelle nomenclature non conformi al CLS.&lt;/STRIKE&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/6269.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2004/11/28/6269.aspx</guid>
            <pubDate>Sun, 28 Nov 2004 17:23:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2004/11/28/6269.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/6269.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/6269.aspx</trackback:ping>
        </item>
        <item>
            <title>E nell'altra sala ci sarà Andrea :-)</title>
            <link>http://blogs.ugidotnet.org/Adrian/archive/2004/10/10/4099.aspx</link>
            <description>&lt;P&gt;Il 2 di dicembre presenter&amp;#242; al workshop "&lt;A href="http://www.ugidotnet.org/workshops/workshops_detail.aspx?ID=db538c59-1dc2-4d8b-ad95-9f7f8c1e949e"&gt;Architecture &amp;amp; Management&lt;/A&gt;" una sessione su "&lt;B&gt;CLS: regole per compilatori e per sviluppatori&lt;/B&gt;".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inizio proprio in modo "potente" :-) visto che nell'altra sala ci sar&amp;#224; proprio &lt;A href="http://blogs.ugidotnet.org/pape/"&gt;Andrea&lt;/A&gt;... L'argomento che presento per&amp;#242; mi piace da morire: &amp;#232; veramente poco conosciuto (ho guardato il webcast di &lt;A href="http://blogs.devleap.com/marco"&gt;Marco Russo&lt;/A&gt; "&lt;A href="http://www.microsoft.com/italy/msdn/eventi/webcast/passati.mspx"&gt;Ambiente object-oriented, CTS, CLS, FxCop&lt;/A&gt;" e la far&amp;#242; ben diversa) e in pi&amp;#249; &amp;#232; un argomento pieno-pieno di sorprese.&lt;/P&gt;
&lt;P&gt;Ah, un'altra cosa: visto il mio accento straniero, cercher&amp;#242; di parlare in IL, cos&amp;#236; mi capirete tutti :-)&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/Adrian/aggbug/4099.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Adrian Florea</dc:creator>
            <guid>http://blogs.ugidotnet.org/Adrian/archive/2004/10/10/4099.aspx</guid>
            <pubDate>Sun, 10 Oct 2004 22:34:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/Adrian/archive/2004/10/10/4099.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/Adrian/comments/commentRss/4099.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/Adrian/services/trackbacks/4099.aspx</trackback:ping>
        </item>
    </channel>
</rss>