Hi,
I was thinking a scenario like that :
class Utopia
=> A Base Class which pass it's fields and methods to derived classes.
class Watashi
=> A derived class, derived from Utopia and inherits everything
class Baka
=> A derived Class, Inherits some fields from Utopia
There are some types above and Type Baka should inherit some specific fields and methods but how ? How can I specify fields and methods that only Baka will inherits whereas Watashi inherits everything from Utopia.
Sample Code :
class Utopia {
public string Moshi;
[Exclude(ClassName("Baka"))]
public string HaveIt;
}
class Baka : Utopia
{
// only Moshi appears here
base.[Moshi]
}
class Watashi : Utopia
{
base.[Moshi][HaveIt];
}
If I want to use Polymorphism :
Utopia _utopiaBaka = new Baka();
_utop.[Moshi];
Utopia _utopiaWatashi = new Watashi();
_utopiaWatashi.[Moshi][HaveIt];
And of course Framework also checks the derived class whether they are base classes for other types.