Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'PlotBackBrush' cannot expose type 'IRectangleBrush' outside the project through class 'PlotSurface2D'

I have an interface

Public Interface IPlotSurface2D
   WriteOnly Property PlotBackBrush() As IRectangleBrush
End Interface

This is the class implementing the interface

Public Class PlotSurface2D
    Implements IPlotSurface2D

    Public WriteOnly Property PlotBackBrush() As IRectangleBrush _
        Implements IPlotSurface2D.PlotBackBrush

        Set(value As IRectangleBrush)
            Me.plotBackBrush_ = DirectCast(value, IRectangleBrush)
            Me.plotBackColor_ = DirectCast(Nothing, Object)
            Me.plotBackImage_ = DirectCast(Nothing, Drawing.Bitmap)
        End Set
    End Property
End Class

I get the follwoing compile error:

Error 86 'PlotBackBrush' cannot expose type 'IRectangleBrush' outside the project through class 'PlotSurface2D'.

How can I fix this?

like image 597
user2617874 Avatar asked Apr 17 '26 22:04

user2617874


1 Answers

Probably IRectangleBrush is not public. Make it public.

Note: Since the interface IPlotSurface2D is public, it wants to expose (and must expose) all the types it references publicly. As a general rule we can say, that the access level of any type exposed by another type must not be more restrictive than the access level of this other type.

like image 161
Olivier Jacot-Descombes Avatar answered Apr 20 '26 19:04

Olivier Jacot-Descombes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!