public static string GetPropertyValue(object instance, PropertyInfo propertyInfo, IFormatProvider formatProvider) { var tempValue = propertyInfo.GetValue(instance, null); if (null == tempValue) { return string.Empty; } var value = Convert.ToString(tempValue, formatProvider); return value; }