-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed as not planned
Description
I would find it convenient to have something like this (contrived example):
enum Animal
{
Mammal
{
Cat,
Dog,
Bear
},
Bird
{
Pigeon,
Hawk,
Ostrich
},
Fish
{
Goldfish,
Trout,
Shark
}
};
Sometimes I want the class hierarchy but sometimes I really don't. Use case would be something like this:
var creature1 = Animal.Bird.Hawk;
Animal creature2 = Animal.Mammal; //OK
creature1 == Animal.Bird; // false
creature1 is Animal.Bird; // true
creature1 is Animal; // true
Reactions are currently unavailable