Microsoft.VisualStudio.Project.SettingsPage.GetTypedConfigProperty C# (CSharp) Method

GetTypedConfigProperty() public method

public GetTypedConfigProperty ( string name, Type type, _PersistStorageType storageType ) : object
name string
type System.Type
storageType _PersistStorageType
return object
        public virtual object GetTypedConfigProperty(string name, Type type, _PersistStorageType storageType)
        {
            string value = GetConfigProperty(name, storageType);
            if(string.IsNullOrEmpty(value)) return null;

            TypeConverter tc = TypeDescriptor.GetConverter(type);
            return tc.ConvertFromInvariantString(value);
        }