compiler errors - C# static class declaring a protected member -


i'm reading book "c# language", , hit note vladimir reshetnikov remark:

"if static class declares protected or protected internal member, compile-time error occurs (cs1057)."

may know why? what's wrong static class having protected member? static class can have private member guess cs1057 error not due accessibility, maybe it's due come compilation issue? protected member override in child classes... couldn't figure out why..

anyone can throw lights here? thanks

cheers, athos

because can't inherit static class, protected serves no purpose - public , private make sense here.

more details can found here: why can't inherit static classes?


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -