I'm looking for some help of converting a long to a type enum in something that would be similar to this:
public object ToActionType(Long myval)
{
return (object)((ActionTypes)myval)
}
:sad: but the trick is that I don't know the enum just the type of the enum...(I also know for a fact that myval is always part of the enum type t.)
public object ToEnum(Long myval,Type t)
{
return ?????
}
Could somebody explain how to achieve that? :o