How to compare enum and int values? April 2, 2023 by Tarik This can help. var constant = 1; if(constant == (int)MyEnum.Valid1){ ...... }