/// <summary> /// Gets the value of the property and either casts or converts the value to the supplied type /// </summary> /// <typeparam name="V">The value's type</typeparam> /// <param name="o">The defining object</param> /// <param name="convert"></param> /// <returns></returns> public V GetValue <V>(object o, bool convert = false) => convert ? (V)Convert.ChangeType(ReflectedElement.GetValue(o), typeof(V)) : (V)ReflectedElement.GetValue(o);
public object GetValue(object o) => ReflectedElement.GetValue(o);
/// <summary> /// Gets the value of the property and converts the value to the supplied type /// </summary> public object GetValue(object o, Type conversionType) => Convert.ChangeType(ReflectedElement.GetValue(o), conversionType);