private object GetValueExpectingType(DreamValueType type) { if (Type == type) { return(Value); } throw new Exception("Value " + this + " was not the expected type of " + type + ""); }
public object GetValueExpectingType(DreamValueType type) { if (IsType(type)) { return(Value); } else { throw new Exception("Value " + this + " was not the expected type of " + type + ""); } }
public bool IsType(DreamValueType type) { return(((int)type & (int)Type) != 0); }