03 July 2014

AccessSpecifier Defaults




































































Default



Permitted declared accessibilities



namespace



public



none (always implicitly public)



enum



public



none (always implicitly public)



interface



public



none



class



private



All¹



struct



private



public, internal, private²



delegate



private



All¹



constructor



protected



All¹



interface member



public



none (always implicitly public)



method



private



All¹



field



private



All¹



user-defined operator



none



public (must be declared public)



¹ All === public, protected, internal, private, protected internal

² structs cannot inherit from structs or classes (although they can, interfaces), hence protected is not a valid modifier

No comments: