Exemple #1
0
        private static Type CoalesceType <T>(T expctd, T actual)
        {
            if (typeof(T) != typeof(object))
            {
                return(typeof(T));
            }

            if (expctd == null && actual == null)
            {
                Throw.BadArg("Expected and Actual", "should not be both null");
            }

            return(((dynamic)expctd ?? (dynamic)actual).GetType());
            //var sampl = (expctd == null) ? actual : expctd;
            //return sampl.GetType();
        }