Is there any way to have an overridden method which is not callable from the
assembly overridding it? A contrived example (though I want this feature,
my program has nothing to do with food service):
Specifically, how can the DemonstrateCond itions method be implemented by
GoodEats, so that it can be called by HealthBureau and not by
GoodEatsWaiter?
Assembly A
{
public class HealthInspector
{
}
public abstract class LicensedEstabli shment
{
internal abstract void DemonstrateCond itions(HealthIn spector);
}
public static class HealthBureau
{
public static void Complain(Licens edEstablishment restaurant)
{
HealthInspector h = GetResponsibleI nspector();
restaurant.Demo nstrateConditio ns(h);
}
}
}
Assembly B references A
{
public class GoodEats : LicensedEstabli shment
{
// yikes!
}
internal class GoodEatsWaiter {}
}
assembly overridding it? A contrived example (though I want this feature,
my program has nothing to do with food service):
Specifically, how can the DemonstrateCond itions method be implemented by
GoodEats, so that it can be called by HealthBureau and not by
GoodEatsWaiter?
Assembly A
{
public class HealthInspector
{
}
public abstract class LicensedEstabli shment
{
internal abstract void DemonstrateCond itions(HealthIn spector);
}
public static class HealthBureau
{
public static void Complain(Licens edEstablishment restaurant)
{
HealthInspector h = GetResponsibleI nspector();
restaurant.Demo nstrateConditio ns(h);
}
}
}
Assembly B references A
{
public class GoodEats : LicensedEstabli shment
{
// yikes!
}
internal class GoodEatsWaiter {}
}
Comment