WHY?? a class cannot be both static and sealed

M

Mattias Sjögren

Maybe I am missing something really elementry here - but why can a sealed
class not be marked as static? (Even though it can contain all static
members?) ... hmmmmm !!

Static classes don't have any constructors, so they can't be
instantiated or derived from anyway. Thus there's no need to mark it
as sealed.



Mattias
 
R

Ravichandran J.V.

I have to add to my previous post. Static is a class modifier in .Net
2.0 and is a method modifier in .Net 1.x and hence cannot be used with a
class.

Please modify my previous answer.


with regards,


J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top