Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error CS0441 

Error Message

'class': a class cannot be both static and sealed

This error occurs when you declare a class that is both static and sealed. Static classes are inherently sealed, so the sealed modifier is not necessary. To resolve, use one modifier only.

The following example generates CS0441:

// CS0441.cs
sealed static class MyClass { }   // CS0441

Community Additions

© 2015 Microsoft