4
Reply

Why Static Class Can Not Contain Protected Members ?

Pratul Tripathi

Pratul Tripathi

Jun 25, 2010
13.8k
0

    Since Static classes are sealed classes, and sealed classes can not be inherited,hence it can not contain protected members, because protected members can not be inherited.

    Pratul Tripathi
    June 29, 2010
    1

    Protected members means they can accessible from child classes,
     But the main features of static class are
    1.only contain static members.
    2.Cann't be instantiate.
    3.are sealed.

    sarada burugula
    November 12, 2010
    0

    Protected members can used when we want access of thoese variable in throughout the inherted classes but static class can not be inherited.

    Uday Gaikwad
    August 25, 2010
    0

    Protected members mean it would be accesible fom child/inherited class. But static class cannot be inherited.

    So what is the use of Protected mmbers in Static Class. That is why Static class can not contain Protected members.

    Bishwajit Saha
    June 30, 2010
    0