C# 2008 aka C# 3.0Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
What do you want to achieve by inheriting a static class ? What are your specs ?
As for why static classes are abstract ? You can ask try asking in the MSDN forums.
The main reason that you cannot inherit a static class is that they are abstract and sealed (this also prevents any instance of them from being created).
So this:
Static class Foo { }
Compiles to this IL:
.class private abstract auto ANSI sealed beforefieldinit Foo
extends [mscorlib] System. Object
{
}