Say I have int val = 1; What is the best way to check whether or not that value corresponds with an enum. Here is a sample enum:
public enum AlertType
{
Success=1,
Warning=2,
Error=3
};
I'm looking for an answer that has the best maintainability.