huntertran / enum-flag-converter

A simple tool to convert C# flagged enum to number, and vice versa.

Home Page:https://huntertran.github.io/enum-flag-converter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot convert combined enum

huntertran opened this issue · comments

For example:

using System;
[Flag]
public Enum HotelAmenities
{
    None = 0,
    HasTV = 1,
    HasMicrowave = 2,
    HasOven = 4,
    CanCook = HasMicrowave | HasOven
}

In this example, the combined enum CanCook will break the parse logic