Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should the compiler have seen this one coming
Message
From
15/10/2010 13:23:57
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01485619
Message ID:
01485624
Views:
70
No, I don't think so. It's creating a property of type Nester that won't really exist until you run it. All the compiler does is verify that Nester is defined.

>
public class Program
>    {
>        static void Main(string[] args)
>        {
>            Nester n = new Nester();
>        }
>    }
>
>    public class Nester
>    {
>        public Nester nested = new Nester();
>    }
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform