public string GetValueAsString(object src) { object value = null; value = SrcProperty.GetValue(src); switch (Type) { case DisplayValueType.DecimalList: return(string.Join(" ", ((List <decimal>)value).Select(d => string.Format("{0:N}", d)))); case DisplayValueType.Decimal: return(string.Format("{0:N}", value)); case DisplayValueType.PickList_Multi: default: return(value?.ToString()); } }
public T GetValue <T>(object src) => SrcProperty.GetValue <T>(src);
public int GetMaxIndex(object obj) => Type == DisplayValueType.DecimalList ? (((SrcProperty.GetValue <List <decimal> >(obj)))?.Count() ?? 0) - 1 : 0;