Web Log di Adrian Florea

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." Antoine de Saint-Exupery
posts - 440, comments - 2715, trackbacks - 3944

My Links

Archives

Post Categories

Image Galleries

.RO Blogs

.RO People

.RO Sites

Blogs

Furls

Links

vinCitori

agosto 2006 Blog Posts

Quiz Sharp #56

Cosa stampa a console il seguente snippet e perché?: using System;   class Foo {     public Foo(out Foo foo)     {         foo = this;         throw new Exception();     } }   class Test {     static void Main()     {         Foo f = null;         try { f = new Foo(out f); }         catch { }         Console.WriteLine(f == null ? "null" : "not null");     } }

posted @ venerdì 25 agosto 2006 11:20 | Feedback (35) | Filed Under [ Quiz Sharp ]

I delegate sono struct???

Quasi da non credere (J. Duffy, "Professional .NET Framework 2.0", p. 61): "The actual IL emmited shows some of the complexities of delegates in the underlying type system:" struct MyDelegate : System.MulticastDelegate{    //[...]} "[...] Notice first that the MyDelegate type breaks one of the rules discussed above, namely that structs cannot derive from types other than ValueType. Delegates have special support in the CTS, so this is allowed." Abbastanza sconvolgente questo paragrafo, non trovate?

posted @ giovedì 3 agosto 2006 09:11 | Feedback (46) | Filed Under [ Carillon .NET ]

Powered by:
Powered By Subtext Powered By ASP.NET