Show/Hide Toolbars

XSharp

'function1' : cannot change access modifiers when overriding 'access' inherited member 'function2'

 

An attempt was made to change the access specification in a method override.

Example

 

The following sample generates XS0507.

 

 

// XS0507.prg  
 

 

Example

 

XS0507 can also occur if a class attempts to override a method marked as protected internal defined in referenced metadata. In this situation, the overriding method should be marked as protected.

 

 

// XS0507_b.prg  
// compile with: /target:library  
 

 

Example

 

The following sample generates XS0507.

 

 

// XS0507_c.prg  
// compile with: /reference:XS0507_b.dll  
public class cly : clx