It seems that for integer, I can either pass an array or comma-separated integers. But for enum, only comma-separated enums work. Why is it so?
enum Animal { Dog, Cat, Mouse};
void Caller()
{
int[] aaa = { 1, 2, 3 };
Ints(1, 2, 3);
Ints(aaa);
Animal[] bbb = { Animal.Dog, Animal.Cat, Animal.Mouse };
Enums(Animal.Dog, Animal.Cat, Animal.Mouse);
//CS1503 Argument 1: cannot convert from 'Animal[]' to 'System.Enum'
Enums(bbb);
}
void Ints(params int[] aaa)
{
}
void Enums(params Enum[] aaa)
{
}