In C# is there a shorthand way to write this:
public static bool IsAllowed(int userID) { return (userID == Personnel.JohnDoe || userID == Personnel.JaneD
Here's the closest that I can think of:
using System.Linq; public static bool IsAllowed(int userID) { return new Personnel[] { Personnel.JohnDoe, Personnel.JaneDoe }.Contains((Personnel)userID); }