public void FunctionRun() { switch (Function) { case EFunction.Rev: { if (Rop.GetType().GetMethod("Rev")?.Invoke(Rop, null) == null) { Rop = 1 / (dynamic)Rop; } else { Rop = (T)Rop.GetType().GetMethod("Rev")?.Invoke(Rop, null); } break; } case EFunction.Sqr: { if (Rop.GetType().GetMethod("Sqr")?.Invoke(Rop, null) == null) { Rop = (dynamic)Rop * (dynamic)Rop; } else { Rop = (T)Rop.GetType().GetMethod("Sqr")?.Invoke(Rop, null); } break; } } }
public T RetTRop() { object str = Rop.GetType().GetMethod("Copy")?.Invoke(null, new object[] { Rop }) ?? Rop; return((T)str); }
public string RetRop() { object str = Rop.GetType().GetMethod("Show")?.Invoke(Rop, null) ?? Rop; return(str.ToString()); }