.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
585 B

// The constants are out of range for the enums' underlying types, so they must not be
// recovered as the members whose bit patterns they happen to truncate to (Val1 in both
// cases): the enum arithmetic would compute a different result than the IL does.
public enum ByteEnum : byte
{
Val1 = 112
}
public static class EnumArithmeticOutOfRange
{
public static int SubtractFromUShortEnum(UShortEnum value)
{
return (int)value - -501;
}
public static int SubtractFromByteEnum(ByteEnum value)
{
return (int)value - 70000;
}
}
public enum UShortEnum : ushort
{
Val1 = 65035
}