trying to compile this code but the if statement coughs up an error:
Error 1 Operator '==' cannot be applied to operands of type 'object' and..
public enum ShoeType
{
soccer = 0,
jogging=1,
fitness=2
}
class Program
{
static void Main(string[] args)
{
string shoetype = "1";
if (Enum.Parse(typeof(ShoeType), shoetype) == ShoeType.jogging)
{
var test = "gotcha";
}
}
}