ApplicationSettings.Internal.PropertyHelper.GetPropertyValue C# (CSharp) Метод

GetPropertyValue() публичный статический Метод

Gets the value of the property.
public static GetPropertyValue ( object instance, PropertyInfo propertyInfo, IFormatProvider formatProvider ) : string
instance object Object from which the property is returned.
propertyInfo System.Reflection.PropertyInfo The property.
formatProvider IFormatProvider Format provider.
Результат string
        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;
        }