Our system has several utility classes.

Some people on our team use (A) a class with all-static methods and a private constructor.

Others use (B) a class with all-static methods (these the juniors).

On code analysis, (A) and (B) raise warning CA1052, which recommends marking the class as sealed.

Included in the MSDN documentation there is the following advice:

If you are targeting .NET Framework 2.0 or earlier, a better approach is to mark the type as static.

Why does this make any sense? I would have thought the opposite; AFAIK, previous to 2.0 there was no way to mark a class as static.

3 Answers 3


The MSDN page is wrong; it should say "later" not "earlier". static classes were introduced in .NET 2.0.


I've seen a good number of utility classes in the pre-2.0 era which have all static methods and a private default constructor to make it non-instantiable. Even back then though, that class should have been sealed.

2.0 and later, simply mark the class as static and be done with it.


The CA1052 warning is a little off-target. You should declare classes that contain only static members as static rather than sealed. Classes declared static are implicitly sealed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.