I have class with internal property:
internal virtual StateEnum EnrolmentState
{
get { ..getter logic }
set { ..setter logic }
}
However I want to be able to access to this property outside of the assembly so I created method that simply returns this property:
public StateEnum GetCurrentState()
{
return EnrolmentState;
}
But when I call this method from class outside of this assembly i get an exception (System.TypeLoadException: Method 'get_EnrolmentState' on type 'EnrolmentAopProxy' from assembly '44fe776f-458e-4c5d-aa35-08c55501dd43, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a method that is not visible from that assembly.)
So it is possible to access to internal member outside of the assembly in any way? Or I should consider different approach.
Just to mention that this class is used as an O/R mapper entity (NPersist) and it is overrided from the O/R mapper to inject persistence code.
Thank you