It compiles
It seems 100% legit
It crashes without raising an exception
Documentation says TypedValue 1070 is Int32
I can Convert.ToInt32(tv.Value) without issue and then cast to an enum
enum is Int32
It's a head scratcher for me for sure
(code abbreviated for clarity)
//get the stored enum status data from the object
statusEnum st = statusEnum.none; //=0
foreach (TypedValue tv in obj.ResultBuffer)
{
if (tv.TypeCode == 1070)
st = (statusEnum)tv.Value;
}