Monday, April 18, 2011

Internal Compiler Error, create your own!

You'd hope that it would be fairly difficult to make the compiler crash in Visual Studio 2010. Sadly not. Try this one on for size:
public class CompilerFail {
public int[] Numbers { set { ; } }
public int FirstNumber { get { return Numbers[0]; } }
}
view raw CompilerFail.cs hosted with ❤ by GitHub
Update: Looks like they fixed this for Visual Studio 2012!