-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompiling throws InvalidOperationException for enums with underlying type other than int #96
Comments
any updates for this bug?
The exception is: The ORM is Fluent NHibernate. |
I have a workaround, but I'm not sure if it is applicable in your case. Try to add an additional computed property which explicitly casts the enum to int. [Computed]
public int OrderStatusAsInt
{
get { return (int)OrderStatus; }
}
[Computed]
public bool B
{
get { return IsActive && (OrderStatusAsInt >= OrderStatus.Complete || OrderStatusAsInt == OrderStatus.Withdraw); }
} (I've converted your B method to a property simply because I'm not familiar with computed methods.) |
.NET Framework 4.5.2
DelegateDecompiler 0.21.0
The code above throws an InvalidOperationException with the following message:
"The binary operator Equal is not defined for the types 'System.Byte' and 'System.Int32'."
Changing the PayGrade enum's underlying type to int prevents the exception.
The text was updated successfully, but these errors were encountered: