Because you will have to cast.
The equals method will check if UserStatus
is an int
(depending on the type you have defined at the property usr.Status
). It will then return that is not (it is of type UserStatus
) thus return false
Better code would be:
return usr.Status == (int)UserStatus.Approved;